{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"color\", \"subtitle\", \"subtitleStyle\", \"onPress\", \"disabled\", \"style\", \"titleRef\", \"titleStyle\", \"title\", \"titleMaxFontSizeMultiplier\", \"mode\", \"theme\", \"testID\"];\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 Platform from \"react-native-web/dist/exports/Platform\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport Pressable from \"react-native-web/dist/exports/Pressable\";\nimport View from \"react-native-web/dist/exports/View\";\nimport color from 'color';\nimport { modeTextVariant } from \"./utils\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport { white } from \"../../styles/themes/v2/colors\";\nimport Text from \"../Typography/Text\";\nconst AppbarContent = _ref => {\n  let {\n      color: titleColor,\n      subtitle,\n      subtitleStyle,\n      onPress,\n      disabled,\n      style,\n      titleRef,\n      titleStyle,\n      title,\n      titleMaxFontSizeMultiplier,\n      mode = 'small',\n      theme: themeOverrides,\n      testID = 'appbar-content'\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const {\n    isV3,\n    colors\n  } = theme;\n  const titleTextColor = titleColor ? titleColor : isV3 ? colors.onSurface : white;\n  const subtitleColor = color(titleTextColor).alpha(0.7).rgb().string();\n  const modeContainerStyles = {\n    small: styles.v3DefaultContainer,\n    medium: styles.v3MediumContainer,\n    large: styles.v3LargeContainer,\n    'center-aligned': styles.v3DefaultContainer\n  };\n  const variant = modeTextVariant[mode];\n  const contentWrapperProps = Object.assign({\n    pointerEvents: 'box-none',\n    style: [styles.container, isV3 && modeContainerStyles[mode], style],\n    testID\n  }, rest);\n  const content = React.createElement(React.Fragment, null, typeof title === 'string' ? React.createElement(Text, _extends({}, isV3 && {\n    variant\n  }, {\n    ref: titleRef,\n    style: [Object.assign({\n      color: titleTextColor\n    }, isV3 ? theme.fonts[variant] : Platform.OS === 'ios' ? theme.fonts.regular : theme.fonts.medium), !isV3 && styles.title, titleStyle],\n    numberOfLines: 1,\n    accessible: true,\n    accessibilityRole: onPress ? 'none' : Platform.OS === 'web' ? 'heading' : 'header',\n    accessibilityTraits: \"header\",\n    testID: `${testID}-title-text`,\n    maxFontSizeMultiplier: titleMaxFontSizeMultiplier\n  }), title) : title, !isV3 && subtitle ? React.createElement(Text, {\n    style: [styles.subtitle, {\n      color: subtitleColor\n    }, subtitleStyle],\n    numberOfLines: 1\n  }, subtitle) : null);\n  if (onPress) {\n    return (React.createElement(Pressable, _extends({\n        accessibilityRole: touchableRole,\n        accessibilityTraits: touchableRole,\n        accessibilityComponentType: \"button\",\n        accessbilityState: disabled ? 'disabled' : null,\n        onPress: onPress,\n        disabled: disabled\n      }, contentWrapperProps), content)\n    );\n  }\n  return React.createElement(View, contentWrapperProps, content);\n};\nAppbarContent.displayName = 'Appbar.Content';\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    paddingHorizontal: 12\n  },\n  v3DefaultContainer: {\n    paddingHorizontal: 0\n  },\n  v3MediumContainer: {\n    paddingHorizontal: 0,\n    justifyContent: 'flex-end',\n    paddingBottom: 24\n  },\n  v3LargeContainer: {\n    paddingHorizontal: 0,\n    paddingTop: 36,\n    justifyContent: 'flex-end',\n    paddingBottom: 28\n  },\n  title: {\n    fontSize: Platform.OS === 'ios' ? 17 : 20\n  },\n  subtitle: {\n    fontSize: Platform.OS === 'ios' ? 11 : 14\n  }\n});\nconst touchableRole = 'button';\nexport default AppbarContent;\nexport { AppbarContent };","map":{"version":3,"names":["React","Platform","StyleSheet","Pressable","View","color","modeTextVariant","useInternalTheme","white","Text","AppbarContent","_ref","titleColor","subtitle","subtitleStyle","onPress","disabled","style","titleRef","titleStyle","title","titleMaxFontSizeMultiplier","mode","theme","themeOverrides","testID","rest","_objectWithoutPropertiesLoose","_excluded","isV3","colors","titleTextColor","onSurface","subtitleColor","alpha","rgb","string","modeContainerStyles","small","styles","v3DefaultContainer","medium","v3MediumContainer","large","v3LargeContainer","variant","contentWrapperProps","Object","assign","pointerEvents","container","content","createElement","Fragment","_extends","ref","fonts","OS","regular","numberOfLines","accessible","accessibilityRole","accessibilityTraits","maxFontSizeMultiplier","touchableRole","accessibilityComponentType","accessbilityState","displayName","create","flex","paddingHorizontal","justifyContent","paddingBottom","paddingTop","fontSize"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Appbar/AppbarContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n  AccessibilityRole,\n  GestureResponderEvent,\n  Platform,\n  StyleProp,\n  StyleSheet,\n  TextStyle,\n  Pressable,\n  View,\n  ViewStyle,\n  ViewProps,\n} from 'react-native';\n\nimport color from 'color';\n\nimport { modeTextVariant } from './utils';\nimport { useInternalTheme } from '../../core/theming';\nimport { white } from '../../styles/themes/v2/colors';\nimport type { $RemoveChildren, MD3TypescaleKey, ThemeProp } from '../../types';\nimport Text, { TextRef } from '../Typography/Text';\n\ntype TitleString = {\n  title: string;\n  titleStyle?: StyleProp<TextStyle>;\n};\n\ntype TitleElement = { title: React.ReactNode; titleStyle?: never };\n\nexport type Props = $RemoveChildren<typeof View> & {\n  // For `title` and `titleStyle` props their types are duplicated due to the generation of documentation.\n  // Appropriate type for them are either `TitleString` or `TitleElement`, depends on `title` type.\n  /**\n   * Text or component for the title.\n   */\n  title: React.ReactNode;\n  /**\n   * Style for the title, if `title` is a string.\n   */\n  titleStyle?: StyleProp<TextStyle>;\n  /**\n   * Reference for the title.\n   */\n  titleRef?: React.RefObject<TextRef>;\n  /**\n   * @deprecated Deprecated in v5.x\n   * Text for the subtitle.\n   */\n  subtitle?: React.ReactNode;\n  /**\n   * @deprecated Deprecated in v5.x\n   * Style for the subtitle.\n   */\n  subtitleStyle?: StyleProp<TextStyle>;\n  /**\n   * Function to execute on press.\n   */\n  onPress?: (e: GestureResponderEvent) => void;\n  /**\n   * If true, disable all interactions for this component.\n   */\n  disabled?: boolean;\n  /**\n   * Custom color for the text.\n   */\n  color?: string;\n  /**\n   * Specifies the largest possible scale a title font can reach.\n   */\n  titleMaxFontSizeMultiplier?: number;\n  /**\n   * @internal\n   */\n  mode?: 'small' | 'medium' | 'large' | 'center-aligned';\n  style?: StyleProp<ViewStyle>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n  /**\n   * testID to be used on tests.\n   */\n  testID?: string;\n} & (TitleString | TitleElement);\n\n/**\n * A component used to display a title and optional subtitle in an appbar.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Appbar } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *     <Appbar.Header>\n *        <Appbar.Content title=\"Title\" />\n *     </Appbar.Header>\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst AppbarContent = ({\n  color: titleColor,\n  subtitle,\n  subtitleStyle,\n  onPress,\n  disabled,\n  style,\n  titleRef,\n  titleStyle,\n  title,\n  titleMaxFontSizeMultiplier,\n  mode = 'small',\n  theme: themeOverrides,\n  testID = 'appbar-content',\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const { isV3, colors } = theme;\n\n  const titleTextColor = titleColor\n    ? titleColor\n    : isV3\n    ? colors.onSurface\n    : white;\n\n  const subtitleColor = color(titleTextColor).alpha(0.7).rgb().string();\n\n  const modeContainerStyles = {\n    small: styles.v3DefaultContainer,\n    medium: styles.v3MediumContainer,\n    large: styles.v3LargeContainer,\n    'center-aligned': styles.v3DefaultContainer,\n  };\n\n  const variant = modeTextVariant[mode] as MD3TypescaleKey;\n\n  const contentWrapperProps = {\n    pointerEvents: 'box-none' as ViewProps['pointerEvents'],\n    style: [styles.container, isV3 && modeContainerStyles[mode], style],\n    testID,\n    ...rest,\n  };\n\n  const content = (\n    <>\n      {typeof title === 'string' ? (\n        <Text\n          {...(isV3 && { variant })}\n          ref={titleRef}\n          style={[\n            {\n              color: titleTextColor,\n              ...(isV3\n                ? theme.fonts[variant]\n                : Platform.OS === 'ios'\n                ? theme.fonts.regular\n                : theme.fonts.medium),\n            },\n            !isV3 && styles.title,\n            titleStyle,\n          ]}\n          numberOfLines={1}\n          accessible\n          accessibilityRole={\n            onPress\n              ? 'none'\n              : Platform.OS === 'web'\n              ? ('heading' as 'header')\n              : 'header'\n          }\n          // @ts-expect-error We keep old a11y props for backwards compat with old RN versions\n          accessibilityTraits=\"header\"\n          testID={`${testID}-title-text`}\n          maxFontSizeMultiplier={titleMaxFontSizeMultiplier}\n        >\n          {title}\n        </Text>\n      ) : (\n        title\n      )}\n      {!isV3 && subtitle ? (\n        <Text\n          style={[styles.subtitle, { color: subtitleColor }, subtitleStyle]}\n          numberOfLines={1}\n        >\n          {subtitle}\n        </Text>\n      ) : null}\n    </>\n  );\n\n  if (onPress) {\n    return (\n      // eslint-disable-next-line react-native-a11y/has-accessibility-props\n      <Pressable\n        accessibilityRole={touchableRole}\n        // @ts-expect-error We keep old a11y props for backwards compat with old RN versions\n        accessibilityTraits={touchableRole}\n        accessibilityComponentType=\"button\"\n        accessbilityState={disabled ? 'disabled' : null}\n        onPress={onPress}\n        disabled={disabled}\n        {...contentWrapperProps}\n      >\n        {content}\n      </Pressable>\n    );\n  }\n\n  return <View {...contentWrapperProps}>{content}</View>;\n};\n\nAppbarContent.displayName = 'Appbar.Content';\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    paddingHorizontal: 12,\n  },\n  v3DefaultContainer: {\n    paddingHorizontal: 0,\n  },\n  v3MediumContainer: {\n    paddingHorizontal: 0,\n    justifyContent: 'flex-end',\n    paddingBottom: 24,\n  },\n  v3LargeContainer: {\n    paddingHorizontal: 0,\n    paddingTop: 36,\n    justifyContent: 'flex-end',\n    paddingBottom: 28,\n  },\n  title: {\n    fontSize: Platform.OS === 'ios' ? 17 : 20,\n  },\n  subtitle: {\n    fontSize: Platform.OS === 'ios' ? 11 : 14,\n  },\n});\n\nconst touchableRole: AccessibilityRole = 'button';\n\nexport default AppbarContent;\n\n// @component-docs ignore-next-line\nexport { AppbarContent };\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAAA,OAAAC,SAAA;AAAA,OAAAC,IAAA;AAc9B,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,KAAK;AAEd,OAAOC,IAAI;AAkFX,MAAMC,aAAa,GAAGC,IAAA,IAeT;EAAA,IAfU;MACrBN,KAAK,EAAEO,UAAU;MACjBC,QAAQ;MACRC,aAAa;MACbC,OAAO;MACPC,QAAQ;MACRC,KAAK;MACLC,QAAQ;MACRC,UAAU;MACVC,KAAK;MACLC,0BAA0B;MAC1BC,IAAI,GAAG,OAAO;MACdC,KAAK,EAAEC,cAAc;MACrBC,MAAM,GAAG;IAEJ,CAAC,GAAAd,IAAA;IADHe,IAAA,GAAAC,6BAAA,CAAAhB,IAAA,EAAAiB,SAAA;EAEH,MAAML,KAAK,GAAGhB,gBAAgB,CAACiB,cAAc,CAAC;EAC9C,MAAM;IAAEK,IAAI;IAAEC;EAAO,CAAC,GAAGP,KAAK;EAE9B,MAAMQ,cAAc,GAAGnB,UAAU,GAC7BA,UAAU,GACViB,IAAI,GACJC,MAAM,CAACE,SAAS,GAChBxB,KAAK;EAET,MAAMyB,aAAa,GAAG5B,KAAK,CAAC0B,cAAc,CAAC,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;EAErE,MAAMC,mBAAmB,GAAG;IAC1BC,KAAK,EAAEC,MAAM,CAACC,kBAAkB;IAChCC,MAAM,EAAEF,MAAM,CAACG,i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