{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"theme\", \"style\"];\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 { useInternalTheme } from \"../../core/theming\";\nimport Text from \"../Typography/Text\";\nimport Title from \"../Typography/v2/Title\";\nconst DialogTitle = _ref => {\n  let {\n      children,\n      theme: themeOverrides,\n      style\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const {\n    isV3,\n    colors,\n    fonts\n  } = theme;\n  const TextComponent = isV3 ? Text : Title;\n  const headerTextStyle = Object.assign({\n    color: isV3 ? colors.onSurface : colors === null || colors === void 0 ? void 0 : colors.text\n  }, isV3 ? fonts.headlineSmall : {});\n  return React.createElement(TextComponent, _extends({\n    variant: \"headlineSmall\",\n    accessibilityRole: \"header\",\n    style: [styles.text, isV3 && styles.v3Text, headerTextStyle, style]\n  }, rest), children);\n};\nDialogTitle.displayName = 'Dialog.Title';\nconst styles = StyleSheet.create({\n  text: {\n    marginTop: 22,\n    marginBottom: 18,\n    marginHorizontal: 24\n  },\n  v3Text: {\n    marginTop: 16,\n    marginBottom: 16\n  }\n});\nexport default DialogTitle;\nexport { DialogTitle };","map":{"version":3,"names":["React","StyleSheet","useInternalTheme","Text","Title","DialogTitle","_ref","children","theme","themeOverrides","style","rest","_objectWithoutPropertiesLoose","_excluded","isV3","colors","fonts","TextComponent","headerTextStyle","Object","assign","color","onSurface","text","headlineSmall","createElement","_extends","variant","accessibilityRole","styles","v3Text","displayName","create","marginTop","marginBottom","marginHorizontal"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, TextStyle } from 'react-native';\n\nimport { useInternalTheme } from '../../core/theming';\nimport type { ThemeProp } from '../../types';\nimport Text from '../Typography/Text';\nimport Title from '../Typography/v2/Title';\n\nexport type Props = React.ComponentPropsWithRef<typeof Title> & {\n  /**\n   * Title text for the `DialogTitle`.\n   */\n  children: React.ReactNode;\n  style?: StyleProp<TextStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\n/**\n * A component to show a title in a Dialog.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Dialog, Portal, Text } from 'react-native-paper';\n *\n * const MyComponent = () => {\n *   const [visible, setVisible] = React.useState(false);\n *\n *   const hideDialog = () => setVisible(false);\n *\n *   return (\n *     <Portal>\n *       <Dialog visible={visible} onDismiss={hideDialog}>\n *         <Dialog.Title>This is a title</Dialog.Title>\n *         <Dialog.Content>\n *           <Text variant=\"bodyMedium\">This is simple dialog</Text>\n *         </Dialog.Content>\n *       </Dialog>\n *     </Portal>\n *   );\n * };\n *\n * export default MyComponent;\n * ```\n */\nconst DialogTitle = ({\n  children,\n  theme: themeOverrides,\n  style,\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const { isV3, colors, fonts } = theme;\n\n  const TextComponent = isV3 ? Text : Title;\n\n  const headerTextStyle = {\n    color: isV3 ? colors.onSurface : colors?.text,\n    ...(isV3 ? fonts.headlineSmall : {}),\n  };\n\n  return (\n    <TextComponent\n      variant=\"headlineSmall\"\n      accessibilityRole=\"header\"\n      style={[styles.text, isV3 && styles.v3Text, headerTextStyle, style]}\n      {...rest}\n    >\n      {children}\n    </TextComponent>\n  );\n};\n\nDialogTitle.displayName = 'Dialog.Title';\n\nconst styles = StyleSheet.create({\n  text: {\n    marginTop: 22,\n    marginBottom: 18,\n    marginHorizontal: 24,\n  },\n  v3Text: {\n    marginTop: 16,\n    marginBottom: 16,\n  },\n});\n\nexport default DialogTitle;\n\n// @component-docs ignore-next-line\nexport { DialogTitle };\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAG9B,SAASC,gBAAgB;AAEzB,OAAOC,IAAI;AACX,OAAOC,KAAK;AA0CZ,MAAMC,WAAW,GAAGC,IAAA,IAKP;EAAA,IALQ;MACnBC,QAAQ;MACRC,KAAK,EAAEC,cAAc;MACrBC;IAEK,CAAC,GAAAJ,IAAA;IADHK,IAAA,GAAAC,6BAAA,CAAAN,IAAA,EAAAO,SAAA;EAEH,MAAML,KAAK,GAAGN,gBAAgB,CAACO,cAAc,CAAC;EAC9C,MAAM;IAAEK,IAAI;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGR,KAAK;EAErC,MAAMS,aAAa,GAAGH,IAAI,GAAGX,IAAI,GAAGC,KAAK;EAEzC,MAAMc,eAAe,GAAAC,MAAA,CAAAC,MAAA;IACnBC,KAAK,EAAEP,IAAI,GAAGC,MAAM,CAACO,SAAS,GAAGP,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEQ;EAAI,GACzCT,IAAI,GAAGE,KAAK,CAACQ,aAAa,GAAG,CAAC,CAAC,CACpC;EAED,OACExB,KAAA,CAAAyB,aAAA,CAACR,aAAa,EAAAS,QAAA;IACZC,OAAO,EAAC,eAAe;IACvBC,iBAAiB,EAAC,QAAQ;IAC1BlB,KAAK,EAAE,CAACmB,MAAM,CAACN,IAAI,EAAET,IAAI,IAAIe,MAAM,CAACC,MAAM,EAAEZ,eAAe,EAAER,KAAK;EAAE,GAChEC,IAAI,GAEPJ,QACY,CAAC;AAEpB,CAAC;AAEDF,WAAW,CAAC0B,WAAW,GAAG,cAAc;AAExC,MAAMF,MAAM,GAAG5B,UAAU,CAAC+B,MAAM,CAAC;EAC/BT,IAAI,EAAE;IACJU,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE;EACpB,CAAC;EACDL,MAAM,EAAE;IACNG,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAe7B,WAAW;AAG1B,SAASA,WAAW","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}