{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"size\", \"color\", \"icon\", \"disabled\", \"onPress\", \"accessibilityLabel\", \"isLeading\", \"theme\", \"rippleColor\"];\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 color from 'color';\nimport { useInternalTheme } from \"../../core/theming\";\nimport { black } from \"../../styles/themes/v2/colors\";\nimport { forwardRef } from \"../../utils/forwardRef\";\nimport IconButton from \"../IconButton/IconButton\";\nconst AppbarAction = forwardRef((_ref, ref) => {\n  let {\n      size = 24,\n      color: iconColor,\n      icon,\n      disabled,\n      onPress,\n      accessibilityLabel,\n      isLeading,\n      theme: themeOverrides,\n      rippleColor\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const actionIconColor = iconColor ? iconColor : theme.isV3 ? isLeading ? theme.colors.onSurface : theme.colors.onSurfaceVariant : color(black).alpha(0.54).rgb().string();\n  return React.createElement(IconButton, _extends({\n    size: size,\n    onPress: onPress,\n    iconColor: actionIconColor,\n    icon: icon,\n    disabled: disabled,\n    accessibilityLabel: accessibilityLabel,\n    animated: true,\n    ref: ref,\n    rippleColor: rippleColor\n  }, rest));\n});\nAppbarAction.displayName = 'Appbar.Action';\nexport default AppbarAction;\nexport { AppbarAction };","map":{"version":3,"names":["React","color","useInternalTheme","black","forwardRef","IconButton","AppbarAction","_ref","ref","size","iconColor","icon","disabled","onPress","accessibilityLabel","isLeading","theme","themeOverrides","rippleColor","rest","_objectWithoutPropertiesLoose","_excluded","actionIconColor","isV3","colors","onSurface","onSurfaceVariant","alpha","rgb","string","createElement","_extends","animated","displayName"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Appbar/AppbarAction.tsx"],"sourcesContent":["import * as React from 'react';\nimport type {\n  Animated,\n  ColorValue,\n  StyleProp,\n  View,\n  ViewStyle,\n} from 'react-native';\n\nimport color from 'color';\nimport type { ThemeProp } from 'src/types';\n\nimport { useInternalTheme } from '../../core/theming';\nimport { black } from '../../styles/themes/v2/colors';\nimport { forwardRef } from '../../utils/forwardRef';\nimport type { IconSource } from '../Icon';\nimport IconButton from '../IconButton/IconButton';\n\nexport type Props = React.ComponentPropsWithoutRef<typeof IconButton> & {\n  /**\n   *  Custom color for action icon.\n   */\n  color?: string;\n  /**\n   * Color of the ripple effect.\n   */\n  rippleColor?: ColorValue;\n  /**\n   * Name of the icon to show.\n   */\n  icon: IconSource;\n  /**\n   * Optional icon size.\n   */\n  size?: number;\n  /**\n   * Whether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch.\n   */\n  disabled?: boolean;\n  /**\n   * Accessibility label for the button. This is read by the screen reader when the user taps the button.\n   */\n  accessibilityLabel?: string;\n  /**\n   * Function to execute on press.\n   */\n  onPress?: () => void;\n  /**\n   * @supported Available in v5.x with theme version 3\n   *\n   * Whether it's the leading button. Note: If `Appbar.BackAction` is present, it will be rendered before any `isLeading` icons.\n   */\n  isLeading?: boolean;\n  style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n  ref?: React.RefObject<View>;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n};\n\n/**\n * A component used to display an action item in the appbar.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Appbar } from 'react-native-paper';\n * import { Platform } from 'react-native';\n *\n * const MORE_ICON = Platform.OS === 'ios' ? 'dots-horizontal' : 'dots-vertical';\n *\n * const MyComponent = () => (\n *     <Appbar.Header>\n *        <Appbar.Content title=\"Title\" subtitle={'Subtitle'} />\n *         <Appbar.Action icon=\"magnify\" onPress={() => {}} />\n *         <Appbar.Action icon={MORE_ICON} onPress={() => {}} />\n *     </Appbar.Header>\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst AppbarAction = forwardRef<View, Props>(\n  (\n    {\n      size = 24,\n      color: iconColor,\n      icon,\n      disabled,\n      onPress,\n      accessibilityLabel,\n      isLeading,\n      theme: themeOverrides,\n      rippleColor,\n      ...rest\n    }: Props,\n    ref\n  ) => {\n    const theme = useInternalTheme(themeOverrides);\n\n    const actionIconColor = iconColor\n      ? iconColor\n      : theme.isV3\n      ? isLeading\n        ? theme.colors.onSurface\n        : theme.colors.onSurfaceVariant\n      : color(black).alpha(0.54).rgb().string();\n\n    return (\n      <IconButton\n        size={size}\n        onPress={onPress}\n        iconColor={actionIconColor}\n        icon={icon}\n        disabled={disabled}\n        accessibilityLabel={accessibilityLabel}\n        animated\n        ref={ref}\n        rippleColor={rippleColor}\n        {...rest}\n      />\n    );\n  }\n);\n\nAppbarAction.displayName = 'Appbar.Action';\n\nexport default AppbarAction;\n\n// @component-docs ignore-next-line\nexport { AppbarAction };\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAS9B,OAAOC,KAAK,MAAM,OAAO;AAGzB,SAASC,gBAAgB;AACzB,SAASC,KAAK;AACd,SAASC,UAAU;AAEnB,OAAOC,UAAU;AAmEjB,MAAMC,YAAY,GAAGF,UAAU,CAC7B,CAAAG,IAAA,EAaEC,GAAG,KACA;EAAA,IAbH;MACEC,IAAI,GAAG,EAAE;MACTR,KAAK,EAAES,SAAS;MAChBC,IAAI;MACJC,QAAQ;MACRC,OAAO;MACPC,kBAAkB;MAClBC,SAAS;MACTC,KAAK,EAAEC,cAAc;MACrBC;IAEK,CAAC,GAAAX,IAAA;IADHY,IAAA,GAAAC,6BAAA,CAAAb,IAAA,EAAAc,SAAA;EAIL,MAAML,KAAK,GAAGd,gBAAgB,CAACe,cAAc,CAAC;EAE9C,MAAMK,eAAe,GAAGZ,SAAS,GAC7BA,SAAS,GACTM,KAAK,CAACO,IAA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