{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"title\", \"theme\", \"style\", \"showDivider\", \"titleMaxFontSizeMultiplier\"];\nfunction _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nimport * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport color from 'color';\nimport { useInternalTheme } from \"../../core/theming\";\nimport { MD3Colors } from \"../../styles/themes/v3/tokens\";\nimport Divider from \"../Divider\";\nimport Text from \"../Typography/Text\";\nconst DrawerSection = _ref => {\n  let {\n      children,\n      title,\n      theme: themeOverrides,\n      style,\n      showDivider = true,\n      titleMaxFontSizeMultiplier\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const {\n    isV3\n  } = theme;\n  const titleColor = isV3 ? theme.colors.onSurfaceVariant : color(theme.colors.text).alpha(0.54).rgb().string();\n  const titleMargin = isV3 ? 28 : 16;\n  const font = isV3 ? theme.fonts.titleSmall : theme.fonts.medium;\n  return React.createElement(View, _extends({\n    style: [styles.container, style]\n  }, rest), title && React.createElement(View, {\n    style: [styles.titleContainer, isV3 && styles.v3TitleContainer]\n  }, title && React.createElement(Text, {\n    variant: \"titleSmall\",\n    numberOfLines: 1,\n    style: [Object.assign({\n      color: titleColor,\n      marginLeft: titleMargin\n    }, font)],\n    maxFontSizeMultiplier: titleMaxFontSizeMultiplier\n  }, title)), children, showDivider && React.createElement(Divider, _extends({}, isV3 && {\n    horizontalInset: true,\n    bold: true\n  }, {\n    style: [styles.divider, isV3 && styles.v3Divider],\n    theme: theme\n  })));\n};\nDrawerSection.displayName = 'Drawer.Section';\nconst styles = StyleSheet.create({\n  container: {\n    marginBottom: 4\n  },\n  titleContainer: {\n    height: 40,\n    justifyContent: 'center'\n  },\n  v3TitleContainer: {\n    height: 56\n  },\n  divider: {\n    marginTop: 4\n  },\n  v3Divider: {\n    backgroundColor: MD3Colors.neutralVariant50\n  }\n});\nexport default DrawerSection;","map":{"version":3,"names":["React","StyleSheet","View","color","useInternalTheme","MD3Colors","Divider","Text","DrawerSection","_ref","children","title","theme","themeOverrides","style","showDivider","titleMaxFontSizeMultiplier","rest","_objectWithoutPropertiesLoose","_excluded","isV3","titleColor","colors","onSurfaceVariant","text","alpha","rgb","string","titleMargin","font","fonts","titleSmall","medium","createElement","_extends","styles","container","titleContainer","v3TitleContainer","variant","numberOfLines","Object","assign","marginLeft","maxFontSizeMultiplier","horizontalInset","bold","divider","v3Divider","displayName","create","marginBottom","height","justifyContent","marginTop","backgroundColor","neutralVariant50"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Drawer/DrawerSection.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport color from 'color';\n\nimport { useInternalTheme } from '../../core/theming';\nimport { MD3Colors } from '../../styles/themes/v3/tokens';\nimport type { ThemeProp } from '../../types';\nimport Divider from '../Divider';\nimport Text from '../Typography/Text';\n\nexport type Props = React.ComponentPropsWithRef<typeof View> & {\n  /**\n   * Title to show as the header for the section.\n   */\n  title?: string;\n  /**\n   * Content of the `Drawer.Section`.\n   */\n  children: React.ReactNode;\n  /**\n   * Whether to show `Divider` at the end of the section. True by default.\n   */\n  showDivider?: boolean;\n  /**\n   * Specifies the largest possible scale a title font can reach.\n   */\n  titleMaxFontSizeMultiplier?: number;\n  style?: StyleProp<ViewStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\n/**\n * A component to group content inside a navigation drawer.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Drawer } from 'react-native-paper';\n *\n * const MyComponent = () => {\n *   const [active, setActive] = React.useState('');\n *\n *   return (\n *     <Drawer.Section title=\"Some title\">\n *       <Drawer.Item\n *         label=\"First Item\"\n *         active={active === 'first'}\n *         onPress={() => setActive('first')}\n *       />\n *       <Drawer.Item\n *         label=\"Second Item\"\n *         active={active === 'second'}\n *         onPress={() => setActive('second')}\n *       />\n *     </Drawer.Section>\n *   );\n * };\n *\n * export default MyComponent;\n * ```\n */\nconst DrawerSection = ({\n  children,\n  title,\n  theme: themeOverrides,\n  style,\n  showDivider = true,\n  titleMaxFontSizeMultiplier,\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const { isV3 } = theme;\n  const titleColor = isV3\n    ? theme.colors.onSurfaceVariant\n    : color(theme.colors.text).alpha(0.54).rgb().string();\n  const titleMargin = isV3 ? 28 : 16;\n  const font = isV3 ? theme.fonts.titleSmall : theme.fonts.medium;\n\n  return (\n    <View style={[styles.container, style]} {...rest}>\n      {title && (\n        <View style={[styles.titleContainer, isV3 && styles.v3TitleContainer]}>\n          {title && (\n            <Text\n              variant=\"titleSmall\"\n              numberOfLines={1}\n              style={[\n                {\n                  color: titleColor,\n                  marginLeft: titleMargin,\n                  ...font,\n                },\n              ]}\n              maxFontSizeMultiplier={titleMaxFontSizeMultiplier}\n            >\n              {title}\n            </Text>\n          )}\n        </View>\n      )}\n      {children}\n      {showDivider && (\n        <Divider\n          {...(isV3 && { horizontalInset: true, bold: true })}\n          style={[styles.divider, isV3 && styles.v3Divider]}\n          theme={theme}\n        />\n      )}\n    </View>\n  );\n};\n\nDrawerSection.displayName = 'Drawer.Section';\n\nconst styles = StyleSheet.create({\n  container: {\n    marginBottom: 4,\n  },\n  titleContainer: {\n    height: 40,\n    justifyContent: 'center',\n  },\n  v3TitleContainer: {\n    height: 56,\n  },\n  divider: {\n    marginTop: 4,\n  },\n  v3Divider: {\n    backgroundColor: MD3Colors.neutralVariant50,\n  },\n});\n\nexport default Draw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