{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"disabled\", \"onPress\", \"theme\", \"status\", \"value\", \"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 StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { RadioButtonContext } from \"./RadioButtonGroup\";\nimport { handlePress, isChecked } from \"./utils\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport { getSelectionControlIOSColor } from \"../Checkbox/utils\";\nimport MaterialCommunityIcon from \"../MaterialCommunityIcon\";\nimport TouchableRipple from \"../TouchableRipple/TouchableRipple\";\nconst RadioButtonIOS = _ref => {\n  let {\n      disabled,\n      onPress,\n      theme: themeOverrides,\n      status,\n      value,\n      testID\n    } = _ref,\n    rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n  const theme = useInternalTheme(themeOverrides);\n  return React.createElement(RadioButtonContext.Consumer, null, context => {\n    const checked = isChecked({\n      contextValue: context === null || context === void 0 ? void 0 : context.value,\n      status,\n      value\n    }) === 'checked';\n    const {\n      checkedColor,\n      rippleColor\n    } = getSelectionControlIOSColor({\n      theme,\n      disabled,\n      customColor: rest.color\n    });\n    const opacity = checked ? 1 : 0;\n    return React.createElement(TouchableRipple, _extends({}, rest, {\n      borderless: true,\n      rippleColor: rippleColor,\n      onPress: disabled ? undefined : event => {\n        handlePress({\n          onPress,\n          value,\n          onValueChange: context === null || context === void 0 ? void 0 : context.onValueChange,\n          event\n        });\n      },\n      accessibilityRole: \"radio\",\n      accessibilityState: {\n        disabled,\n        checked\n      },\n      accessibilityLiveRegion: \"polite\",\n      style: styles.container,\n      testID: testID,\n      theme: theme\n    }), React.createElement(View, {\n      style: {\n        opacity\n      }\n    }, React.createElement(MaterialCommunityIcon, {\n      allowFontScaling: false,\n      name: \"check\",\n      size: 24,\n      color: checkedColor,\n      direction: \"ltr\"\n    })));\n  });\n};\nRadioButtonIOS.displayName = 'RadioButton.IOS';\nconst styles = StyleSheet.create({\n  container: {\n    borderRadius: 18,\n    padding: 6\n  }\n});\nexport default RadioButtonIOS;\nexport { RadioButtonIOS };","map":{"version":3,"names":["React","StyleSheet","View","RadioButtonContext","handlePress","isChecked","useInternalTheme","getSelectionControlIOSColor","MaterialCommunityIcon","TouchableRipple","RadioButtonIOS","_ref","disabled","onPress","theme","themeOverrides","status","value","testID","rest","_objectWithoutPropertiesLoose","_excluded","createElement","Consumer","context","checked","contextValue","checkedColor","rippleColor","customColor","color","opacity","_extends","borderless","undefined","event","onValueChange","accessibilityRole","accessibilityState","accessibilityLiveRegion","style","styles","container","allowFontScaling","name","size","direction","displayName","create","borderRadius","padding"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/RadioButton/RadioButtonIOS.tsx"],"sourcesContent":["import * as React from 'react';\nimport { GestureResponderEvent, StyleSheet, View } from 'react-native';\n\nimport { RadioButtonContext, RadioButtonContextType } from './RadioButtonGroup';\nimport { handlePress, isChecked } from './utils';\nimport { useInternalTheme } from '../../core/theming';\nimport type { $RemoveChildren, ThemeProp } from '../../types';\nimport { getSelectionControlIOSColor } from '../Checkbox/utils';\nimport MaterialCommunityIcon from '../MaterialCommunityIcon';\nimport TouchableRipple from '../TouchableRipple/TouchableRipple';\n\nexport type Props = $RemoveChildren<typeof TouchableRipple> & {\n  /**\n   * Value of the radio button\n   */\n  value: string;\n  /**\n   * Status of radio button.\n   */\n  status?: 'checked' | 'unchecked';\n  /**\n   * Whether radio is disabled.\n   */\n  disabled?: boolean;\n  /**\n   * Function to execute on press.\n   */\n  onPress?: (e: GestureResponderEvent) => void;\n  /**\n   * Custom color for radio.\n   */\n  color?: string;\n  /**\n   * @optional\n   */\n  theme?: ThemeProp;\n  /**\n   * testID to be used on tests.\n   */\n  testID?: string;\n};\n\n/**\n * Radio buttons allow the selection a single option from a set.\n * This component follows platform guidelines for iOS, but can be used\n * on any platform.\n *\n * @extends TouchableRipple props https://callstack.github.io/react-native-paper/docs/components/TouchableRipple\n */\nconst RadioButtonIOS = ({\n  disabled,\n  onPress,\n  theme: themeOverrides,\n  status,\n  value,\n  testID,\n  ...rest\n}: Props) => {\n  const theme = useInternalTheme(themeOverrides);\n\n  return (\n    <RadioButtonContext.Consumer>\n      {(context?: RadioButtonContextType) => {\n        const checked =\n          isChecked({\n            contextValue: context?.value,\n            status,\n            value,\n          }) === 'checked';\n\n        const { checkedColor, rippleColor } = getSelectionControlIOSColor({\n          theme,\n          disabled,\n          customColor: rest.color,\n        });\n        const opacity = checked ? 1 : 0;\n\n        return (\n          <TouchableRipple\n            {...rest}\n            borderless\n            rippleColor={rippleColor}\n            onPress={\n              disabled\n                ? undefined\n                : (event) => {\n                    handlePress({\n                      onPress,\n                      value,\n                      onValueChange: context?.onValueChange,\n                      event,\n                    });\n                  }\n            }\n            accessibilityRole=\"radio\"\n            accessibilityState={{ disabled, checked }}\n            accessibilityLiveRegion=\"polite\"\n            style={styles.container}\n            testID={testID}\n            theme={theme}\n          >\n            <View style={{ opacity }}>\n              <MaterialCommunityIcon\n                allowFontScaling={false}\n                name=\"check\"\n                size={24}\n                color={checkedColor}\n                direction=\"ltr\"\n              />\n            </View>\n          </TouchableRipple>\n        );\n      }}\n    </RadioButtonContext.Consumer>\n  );\n};\n\nRadioButtonIOS.displayName = 'RadioButton.IOS';\n\nconst styles = StyleSheet.create({\n  container: {\n    borderRadius: 18,\n    padding: 6,\n  },\n});\n\nexport default RadioButtonIOS;\n\n// @component-docs ignore-next-line\nexport { RadioButtonIOS };\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OA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