{"ast":null,"code":"import * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport Text from \"../Typography/Text\";\nimport Caption from \"../Typography/v2/Caption\";\nimport Title from \"../Typography/v2/Title\";\nconst LEFT_SIZE = 40;\nconst CardTitle = ({\n  title,\n  titleStyle,\n  titleNumberOfLines = 1,\n  titleVariant = 'bodyLarge',\n  titleMaxFontSizeMultiplier,\n  subtitle,\n  subtitleStyle,\n  subtitleNumberOfLines = 1,\n  subtitleVariant = 'bodyMedium',\n  subtitleMaxFontSizeMultiplier,\n  left,\n  leftStyle,\n  right,\n  rightStyle,\n  style,\n  theme: themeOverrides\n}) => {\n  const theme = useInternalTheme(themeOverrides);\n  const TitleComponent = theme.isV3 ? Text : Title;\n  const SubtitleComponent = theme.isV3 ? Text : Caption;\n  const minHeight = subtitle || left || right ? 72 : 50;\n  const marginBottom = subtitle ? 0 : 2;\n  return React.createElement(View, {\n    style: [styles.container, {\n      minHeight\n    }, style]\n  }, left ? React.createElement(View, {\n    style: [styles.left, leftStyle]\n  }, left({\n    size: LEFT_SIZE\n  })) : null, React.createElement(View, {\n    style: [styles.titles]\n  }, title && React.createElement(TitleComponent, {\n    style: [styles.title, {\n      marginBottom\n    }, titleStyle],\n    numberOfLines: titleNumberOfLines,\n    variant: titleVariant,\n    maxFontSizeMultiplier: titleMaxFontSizeMultiplier\n  }, title), subtitle && React.createElement(SubtitleComponent, {\n    style: [styles.subtitle, subtitleStyle],\n    numberOfLines: subtitleNumberOfLines,\n    variant: subtitleVariant,\n    maxFontSizeMultiplier: subtitleMaxFontSizeMultiplier\n  }, subtitle)), React.createElement(View, {\n    style: rightStyle\n  }, right ? right({\n    size: 24\n  }) : null));\n};\nCardTitle.displayName = 'Card.Title';\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n    paddingLeft: 16\n  },\n  left: {\n    justifyContent: 'center',\n    marginRight: 16,\n    height: LEFT_SIZE,\n    width: LEFT_SIZE\n  },\n  titles: {\n    flex: 1,\n    flexDirection: 'column',\n    justifyContent: 'center'\n  },\n  title: {\n    minHeight: 30,\n    paddingRight: 16\n  },\n  subtitle: {\n    minHeight: 20,\n    marginVertical: 0,\n    paddingRight: 16\n  }\n});\nexport default CardTitle;\nexport { CardTitle };","map":{"version":3,"names":["React","StyleSheet","View","useInternalTheme","Text","Caption","Title","LEFT_SIZE","CardTitle","title","titleStyle","titleNumberOfLines","titleVariant","titleMaxFontSizeMultiplier","subtitle","subtitleStyle","subtitleNumberOfLines","subtitleVariant","subtitleMaxFontSizeMultiplier","left","leftStyle","right","rightStyle","style","theme","themeOverrides","TitleComponent","isV3","SubtitleComponent","minHeight","marginBottom","createElement","styles","container","size","titles","numberOfLines","variant","maxFontSizeMultiplier","displayName","create","flexDirection","alignItems","justifyContent","paddingLeft","marginRight","height","width","flex","paddingRight","marginVertical"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Card/CardTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n  StyleProp,\n  StyleSheet,\n  TextStyle,\n  View,\n  ViewStyle,\n} from 'react-native';\n\nimport { useInternalTheme } from '../../core/theming';\nimport type { MD3TypescaleKey, ThemeProp } from '../../types';\nimport Text from '../Typography/Text';\nimport Caption from '../Typography/v2/Caption';\nimport Title from '../Typography/v2/Title';\n\nexport type Props = React.ComponentPropsWithRef<typeof View> & {\n  /**\n   * Text for the title. Note that this will only accept a string or `<Text>`-based node.\n   */\n  title: React.ReactNode;\n  /**\n   * Style for the title.\n   */\n  titleStyle?: StyleProp<TextStyle>;\n  /**\n   * Number of lines for the title.\n   */\n  titleNumberOfLines?: number;\n  /**\n   * @supported Available in v5.x with theme version 3\n   *\n   * Title text variant defines appropriate text styles for type role and its size.\n   * Available variants:\n   *\n   *  Display: `displayLarge`, `displayMedium`, `displaySmall`\n   *\n   *  Headline: `headlineLarge`, `headlineMedium`, `headlineSmall`\n   *\n   *  Title: `titleLarge`, `titleMedium`, `titleSmall`\n   *\n   *  Label:  `labelLarge`, `labelMedium`, `labelSmall`\n   *\n   *  Body: `bodyLarge`, `bodyMedium`, `bodySmall`\n   */\n  titleVariant?: keyof typeof MD3TypescaleKey;\n  /**\n   * Text for the subtitle. Note that this will only accept a string or `<Text>`-based node.\n   */\n  subtitle?: React.ReactNode;\n  /**\n   * Style for the subtitle.\n   */\n  subtitleStyle?: StyleProp<TextStyle>;\n  /**\n   * Number of lines for the subtitle.\n   */\n  subtitleNumberOfLines?: number;\n  /**\n   * @supported Available in v5.x with theme version 3\n   *\n   * Subtitle text variant defines appropriate text styles for type role and its size.\n   * Available variants:\n   *\n   *  Display: `displayLarge`, `displayMedium`, `displaySmall`\n   *\n   *  Headline: `headlineLarge`, `headlineMedium`, `headlineSmall`\n   *\n   *  Title: `titleLarge`, `titleMedium`, `titleSmall`\n   *\n   *  Label:  `labelLarge`, `labelMedium`, `labelSmall`\n   *\n   *  Body: `bodyLarge`, `bodyMedium`, `bodySmall`\n   */\n  subtitleVariant?: keyof typeof MD3TypescaleKey;\n  /**\n   * Callback which returns a React element to display on the left side.\n   */\n  left?: (props: { size: number }) => React.ReactNode;\n  /**\n   * Style for the left element wrapper.\n   */\n  leftStyle?: StyleProp<ViewStyle>;\n  /**\n   * Callback which returns a React element to display on the right side.\n   */\n  right?: (props: { size: number }) => React.ReactNode;\n  /**\n   * Style for the right element wrapper.\n   */\n  rightStyle?: StyleProp<ViewStyle>;\n  /**\n   * @internal\n   */\n  index?: number;\n  /**\n   * @internal\n   */\n  total?: number;\n  /**\n   * Specifies the largest possible scale a title font can reach.\n   */\n  titleMaxFontSizeMultiplier?: number;\n  /**\n   * Specifies the largest possible scale a subtitle font can reach.\n   */\n  subtitleMaxFontSizeMultiplier?: number;\n  style?: StyleProp<ViewStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\nconst LEFT_SIZE = 40;\n\n/**\n * A component to show a title, subtitle and an avatar inside a Card.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Avatar, Card, IconButton } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *   <Card.Title\n *     title=\"Card Title\"\n *     subtitle=\"Card Subtitle\"\n *     left={(props) => <Avatar.Icon {...props} icon=\"folder\" />}\n *     right={(props) => <IconButton {...props} icon=\"dots-vertical\" onPress={() => {}} />}\n *   />\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst CardTitle = ({\n  title,\n  titleStyle,\n  titleNumberOfLines = 1,\n  titleVariant = 'bodyLarge',\n  titleMaxFontSizeMultiplier,\n  subtitle,\n  subtitleStyle,\n  subtitleNumberOfLines = 1,\n  subtitleVariant = 'bodyMedium',\n  subtitleMaxFontSizeMultiplier,\n  left,\n  leftStyle,\n  right,\n  rightStyle,\n  style,\n  theme: themeOverrides,\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const TitleComponent = theme.isV3 ? Text : Title;\n  const SubtitleComponent = theme.isV3 ? Text : Caption;\n\n  const minHeight = subtitle || left || right ? 72 : 50;\n  const marginBottom = subtitle ? 0 : 2;\n\n  return (\n    <View style={[styles.container, { minHeight }, style]}>\n      {left ? (\n        <View style={[styles.left, leftStyle]}>\n          {left({\n            size: LEFT_SIZE,\n          })}\n        </View>\n      ) : null}\n\n      <View style={[styles.titles]}>\n        {title && (\n          <TitleComponent\n            style={[styles.title, { marginBottom }, titleStyle]}\n            numberOfLines={titleNumberOfLines}\n            variant={titleVariant}\n            maxFontSizeMultiplier={titleMaxFontSizeMultiplier}\n          >\n            {title}\n          </TitleComponent>\n        )}\n        {subtitle && (\n          <SubtitleComponent\n            style={[styles.subtitle, subtitleStyle]}\n            numberOfLines={subtitleNumberOfLines}\n            variant={subtitleVariant}\n            maxFontSizeMultiplier={subtitleMaxFontSizeMultiplier}\n          >\n            {subtitle}\n          </SubtitleComponent>\n        )}\n      </View>\n      <View style={rightStyle}>{right ? right({ size: 24 }) : null}</View>\n    </View>\n  );\n};\n\nCardTitle.displayName = 'Card.Title';\n\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n    paddingLeft: 16,\n  },\n\n  left: {\n    justifyContent: 'center',\n    marginRight: 16,\n    height: LEFT_SIZE,\n    width: LEFT_SIZE,\n  },\n\n  titles: {\n    flex: 1,\n    flexDirection: 'column',\n    justifyContent: 'center',\n  },\n\n  title: {\n    minHeight: 30,\n    paddingRight: 16,\n  },\n\n  subtitle: {\n    minHeight: 20,\n    marginVertical: 0,\n    paddingRight: 16,\n  },\n});\n\nexport default CardTitle;\n\n// @component-docs ignore-next-line\nexport { CardTitle };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAS9B,SAASC,gBAAgB;AAEzB,OAAOC,IAAI;AACX,OAAOC,OAAO;AACd,OAAOC,KAAK;AAoGZ,MAAMC,SAAS,GAAG,EAAE;AAsBpB,MAAMC,SAAS,GAAGA,CAAC;EACjBC,KAAK;EACLC,UAAU;EACVC,kBAAkB,GAAG,CAAC;EACtBC,YAAY,GAAG,WAAW;EAC1BC,0BAA0B;EAC1BC,QAAQ;EACRC,aAAa;EACbC,qBAAqB,GAAG,CAAC;EACzBC,eAAe,GAAG,YAAY;EAC9BC,6BAA6B;EAC7BC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,UAAU;EACVC,KAAK;EACLC,KAAK,EAAEC;AACF,CAAC,KAAK;EACX,MAAMD,KAAK,GAAGrB,gBAAgB,CAACsB,cAAc,CAAC;EAC9C,MAAMC,cAAc,GAAGF,KAAK,CAACG,IAAI,GAAGvB,IAAI,GAAGE,KAAK;EAChD,MAAMsB,iBAAiB,GAAGJ,KAAK,CAACG,IAAI,GAAGvB,IAAI,GAAGC,OAAO;EAErD,MAAMwB,SAAS,GAAGf,QAA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