"use strict";

import { View, StyleSheet } from 'react-native';
import SectionTitle from './SectionTitle';
import { useColorScheme } from '../hooks/use-color-scheme';
import { normalizeColorScheme } from '../utils/themeUtils';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const Section = ({
  title,
  theme,
  children,
  isFirst = false,
  style
}) => {
  const colorScheme = normalizeColorScheme(useColorScheme(), theme);
  return /*#__PURE__*/_jsxs(View, {
    style: [styles.section, isFirst && styles.firstSection, style],
    children: [title && /*#__PURE__*/_jsx(SectionTitle, {
      title: title,
      theme: colorScheme
    }), children]
  });
};
const styles = StyleSheet.create({
  section: {
    marginBottom: 10
  },
  firstSection: {
    marginTop: 8
  }
});
export default Section;
//# sourceMappingURL=Section.js.map