{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"style\", \"status\", \"label\", \"onPress\", \"onLongPress\", \"labelStyle\", \"theme\", \"testID\", \"mode\", \"position\", \"accessibilityLabel\", \"disabled\", \"labelVariant\", \"labelMaxFontSizeMultiplier\", \"rippleColor\", \"background\", \"hitSlop\"];\nimport * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport Checkbox from \"./Checkbox\";\nimport CheckboxAndroid from \"./CheckboxAndroid\";\nimport CheckboxIOS from \"./CheckboxIOS\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport TouchableRipple from \"../TouchableRipple/TouchableRipple\";\nimport Text from \"../Typography/Text\";\nconst CheckboxItem = _ref => {\n  let {\n      style,\n      status,\n      label,\n      onPress,\n      onLongPress,\n      labelStyle,\n      theme: themeOverrides,\n      testID,\n      mode,\n      position = 'trailing',\n      accessibilityLabel = label,\n      disabled,\n      labelVariant = 'bodyLarge',\n      labelMaxFontSizeMultiplier = 1.5,\n      rippleColor,\n      background,\n      hitSlop\n    } = _ref,\n    props = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  const checkboxProps = Object.assign({}, props, {\n    status,\n    theme,\n    disabled\n  });\n  const isLeading = position === 'leading';\n  let checkbox;\n  if (mode === 'android') {\n    checkbox = React.createElement(CheckboxAndroid, checkboxProps);\n  } else if (mode === 'ios') {\n    checkbox = React.createElement(CheckboxIOS, checkboxProps);\n  } else {\n    checkbox = React.createElement(Checkbox, checkboxProps);\n  }\n  const textColor = theme.isV3 ? theme.colors.onSurface : theme.colors.text;\n  const disabledTextColor = theme.isV3 ? theme.colors.onSurfaceDisabled : theme.colors.disabled;\n  const textAlign = isLeading ? 'right' : 'left';\n  const computedStyle = {\n    color: disabled ? disabledTextColor : textColor,\n    textAlign\n  };\n  return React.createElement(TouchableRipple, {\n    accessibilityLabel: accessibilityLabel,\n    accessibilityRole: \"checkbox\",\n    accessibilityState: {\n      checked: status === 'checked',\n      disabled\n    },\n    onPress: onPress,\n    onLongPress: onLongPress,\n    testID: testID,\n    disabled: disabled,\n    rippleColor: rippleColor,\n    theme: theme,\n    background: background,\n    hitSlop: hitSlop\n  }, React.createElement(View, {\n    style: [styles.container, style],\n    pointerEvents: \"none\",\n    importantForAccessibility: \"no-hide-descendants\"\n  }, isLeading && checkbox, React.createElement(Text, {\n    variant: labelVariant,\n    testID: `${testID}-text`,\n    maxFontSizeMultiplier: labelMaxFontSizeMultiplier,\n    style: [styles.label, !theme.isV3 && styles.font, computedStyle, labelStyle]\n  }, label), !isLeading && checkbox));\n};\nCheckboxItem.displayName = 'Checkbox.Item';\nexport default CheckboxItem;\nexport { CheckboxItem };\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n    paddingVertical: 8,\n    paddingHorizontal: 16\n  },\n  label: {\n    flexShrink: 1,\n    flexGrow: 1\n  },\n  font: {\n    fontSize: 16\n  }\n});","map":{"version":3,"names":["React","StyleSheet","View","Checkbox","CheckboxAndroid","CheckboxIOS","useInternalTheme","TouchableRipple","Text","CheckboxItem","_ref","style","status","label","onPress","onLongPress","labelStyle","theme","themeOverrides","testID","mode","position","accessibilityLabel","disabled","labelVariant","labelMaxFontSizeMultiplier","rippleColor","background","hitSlop","props","_objectWithoutPropertiesLoose","_excluded","checkboxProps","Object","assign","isLeading","checkbox","createElement","textColor","isV3","colors","onSurface","text","disabledTextColor","onSurfaceDisabled","textAlign","computedStyle","color","accessibilityRole","accessibilityState","checked","styles","container","pointerEvents","importantForAccessibility","variant","maxFontSizeMultiplier","font","displayName","create","flexDirection","alignItems","justifyContent","paddingVertical","paddingHorizontal","flexShrink","flexGrow","fontSize"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Checkbox/CheckboxItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n  ColorValue,\n  GestureResponderEvent,\n  PressableAndroidRippleConfig,\n  StyleProp,\n  StyleSheet,\n  TextStyle,\n  View,\n  ViewStyle,\n} from 'react-native';\n\nimport Checkbox from './Checkbox';\nimport CheckboxAndroid from './CheckboxAndroid';\nimport CheckboxIOS from './CheckboxIOS';\nimport { useInternalTheme } from '../../core/theming';\nimport type { ThemeProp, MD3TypescaleKey } from '../../types';\nimport TouchableRipple, {\n  Props as TouchableRippleProps,\n} from '../TouchableRipple/TouchableRipple';\nimport Text from '../Typography/Text';\n\nexport type Props = {\n  /**\n   * Status of checkbox.\n   */\n  status: 'checked' | 'unchecked' | 'indeterminate';\n  /**\n   * Whether checkbox is disabled.\n   */\n  disabled?: boolean;\n  /**\n   * Label to be displayed on the item.\n   */\n  label: string;\n  /**\n   * Function to execute on press.\n   */\n  onPress?: (e: GestureResponderEvent) => void;\n  /**\n   * Function to execute on long press.\n   */\n  onLongPress?: (e: GestureResponderEvent) => void;\n  /**\n   * Type of background drawabale to display the feedback (Android).\n   * https://reactnative.dev/docs/pressable#rippleconfig\n   */\n  background?: PressableAndroidRippleConfig;\n  /**\n   * Accessibility label for the touchable. This is read by the screen reader when the user taps the touchable.\n   */\n  accessibilityLabel?: string;\n  /**\n   * Custom color for unchecked checkbox.\n   */\n  uncheckedColor?: string;\n  /**\n   * Custom color for checkbox.\n   */\n  color?: string;\n  /**\n   * Color of the ripple effect.\n   */\n  rippleColor?: ColorValue;\n  /**\n   * Additional styles for container View.\n   */\n  style?: StyleProp<ViewStyle>;\n  /**\n   * Specifies the largest possible scale a label font can reach.\n   */\n  labelMaxFontSizeMultiplier?: number;\n  /**\n   * Style that is passed to Label element.\n   */\n  labelStyle?: StyleProp<TextStyle>;\n  /**\n   * @supported Available in v5.x with theme version 3\n   *\n   * Label 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  labelVariant?: keyof typeof MD3TypescaleKey;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n  /**\n   * testID to be used on tests.\n   */\n  testID?: string;\n  /**\n   * Checkbox control position.\n   */\n  position?: 'leading' | 'trailing';\n  /**\n   * Whether `<Checkbox.Android />` or `<Checkbox.IOS />` should be used.\n   * Left undefined `<Checkbox />` will be used.\n   */\n  mode?: 'android' | 'ios';\n  /**\n   * Sets additional distance outside of element in which a press can be detected.\n   */\n  hitSlop?: TouchableRippleProps['hitSlop'];\n};\n\n/**\n * Checkbox.Item allows you to press the whole row (item) instead of only the Checkbox.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { View } from 'react-native';\n * import { Checkbox } from 'react-native-paper';\n *\n * const MyComponent = () => (\n *   <View>\n *     <Checkbox.Item label=\"Item\" status=\"checked\" />\n *   </View>\n * );\n *\n * export default MyComponent;\n *```\n */\n\nconst CheckboxItem = ({\n  style,\n  status,\n  label,\n  onPress,\n  onLongPress,\n  labelStyle,\n  theme: themeOverrides,\n  testID,\n  mode,\n  position = 'trailing',\n  accessibilityLabel = label,\n  disabled,\n  labelVariant = 'bodyLarge',\n  labelMaxFontSizeMultiplier = 1.5,\n  rippleColor,\n  background,\n  hitSlop,\n  ...props\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n  const checkboxProps = { ...props, status, theme, disabled };\n  const isLeading = position === 'leading';\n  let checkbox;\n\n  if (mode === 'android') {\n    checkbox = <CheckboxAndroid {...checkboxProps} />;\n  } else if (mode === 'ios') {\n    checkbox = <CheckboxIOS {...checkboxProps} />;\n  } else {\n    checkbox = <Checkbox {...checkboxProps} />;\n  }\n\n  const textColor = theme.isV3 ? theme.colors.onSurface : theme.colors.text;\n  const disabledTextColor = theme.isV3\n    ? theme.colors.onSurfaceDisabled\n    : theme.colors.disabled;\n  const textAlign = isLeading ? 'right' : 'left';\n\n  const computedStyle = {\n    color: disabled ? disabledTextColor : textColor,\n    textAlign,\n  } as TextStyle;\n\n  return (\n    <TouchableRipple\n      accessibilityLabel={accessibilityLabel}\n      accessibilityRole=\"checkbox\"\n      accessibilityState={{\n        checked: status === 'checked',\n        disabled,\n      }}\n      onPress={onPress}\n      onLongPress={onLongPress}\n      testID={testID}\n      disabled={disabled}\n      rippleColor={rippleColor}\n      theme={theme}\n      background={background}\n      hitSlop={hitSlop}\n    >\n      <View\n        style={[styles.container, style]}\n        pointerEvents=\"none\"\n        importantForAccessibility=\"no-hide-descendants\"\n      >\n        {isLeading && checkbox}\n        <Text\n          variant={labelVariant}\n          testID={`${testID}-text`}\n          maxFontSizeMultiplier={labelMaxFontSizeMultiplier}\n          style={[\n            styles.label,\n            !theme.isV3 && styles.font,\n            computedStyle,\n            labelStyle,\n          ]}\n        >\n          {label}\n        </Text>\n        {!isLeading && checkbox}\n      </View>\n    </TouchableRipple>\n  );\n};\n\nCheckboxItem.displayName = 'Checkbox.Item';\n\nexport default CheckboxItem;\n\n// @component-docs ignore-next-line\nexport { CheckboxItem };\n\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n    paddingVertical: 8,\n    paddingHorizontal: 16,\n  },\n  label: {\n    flexShrink: 1,\n    flexGrow: 1,\n  },\n  font: {\n    fontSize: 16,\n  },\n});\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAY9B,OAAOC,QAAQ;AACf,OAAOC,eAAe;AACtB,OAAOC,WAAW;AAClB,SAASC,gBAAgB;AAEzB,OAAOC,eAAe;AAGtB,OAAOC,IAAI;AAmHX,MAAMC,YAAY,GAAGC,IAAA,IAmBR;EAAA,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