"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _SectionTitle = _interopRequireDefault(require("./SectionTitle"));
var _useColorScheme = require("../hooks/use-color-scheme");
var _themeUtils = require("../utils/themeUtils");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Section = ({
  title,
  theme,
  children,
  isFirst = false,
  style
}) => {
  const colorScheme = (0, _themeUtils.normalizeColorScheme)((0, _useColorScheme.useColorScheme)(), theme);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
    style: [styles.section, isFirst && styles.firstSection, style],
    children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SectionTitle.default, {
      title: title,
      theme: colorScheme
    }), children]
  });
};
const styles = _reactNative.StyleSheet.create({
  section: {
    marginBottom: 10,
    gap: 12
  },
  firstSection: {
    marginTop: 8
  }
});
var _default = exports.default = Section;
//# sourceMappingURL=Section.js.map