import styles from '@/styles/screens/reserva/detail.styles';
import { ReactNode } from 'react';
import { Text, View } from 'react-native';
import { DashedDivider } from './DashedDivider';

type Props = {
  title?: string;
  children: ReactNode;
};

export function Section({ title, children }: Props) {
  return (
    <View style={styles.summaryCard}>
      {!!title && (
        <>
          <Text style={styles.sectionTitle}>{title}</Text>
        </>
      )}
      {children}
    </View>
  );
}
