{"ast":null,"code":"import React from 'react';\nimport { Radio } from \"/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/src/index\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nexport var Example = function Example() {\n  var myRef = React.useRef({});\n  return React.createElement(Radio.Group, {\n    name: \"exampleGroup\",\n    colorScheme: \"success\",\n    accessibilityLabel: \"pick an option\",\n    onChange: function onChange(value) {\n      if (value === '2') {\n        var _myRef$current;\n\n        if (Platform.OS !== 'web') myRef == null ? void 0 : (_myRef$current = myRef.current) == null ? void 0 : _myRef$current.setNativeProps({\n          backgroundColor: '#00de0050'\n        });\n      } else {\n        var _myRef$current2;\n\n        if (Platform.OS !== 'web') myRef == null ? void 0 : (_myRef$current2 = myRef.current) == null ? void 0 : _myRef$current2.setNativeProps({\n          backgroundColor: '#fa000050'\n        });\n      }\n    }\n  }, React.createElement(Radio, {\n    colorScheme: \"success\",\n    value: \"1\",\n    my: 1\n  }, \"Wrong\"), React.createElement(Radio, {\n    colorScheme: \"success\",\n    ref: myRef,\n    value: \"2\",\n    my: 1\n  }, \"Right\"));\n};","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/storybook/stories/components/primitives/Radio/withRef.tsx"],"names":["React","Radio","Example","myRef","useRef","value","Platform","OS","current","setNativeProps","backgroundColor"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAT;;AAGA,OAAO,IAAMC,OAAO,GAAG,SAAVA,OAAU,GAAM;AAC3B,MAAMC,KAAK,GAAGH,KAAK,CAACI,MAAN,CAAa,EAAb,CAAd;AAEA,SACE,oBAAC,KAAD,CAAO,KAAP;AACE,IAAA,IAAI,EAAC,cADP;AAEE,IAAA,WAAW,EAAC,SAFd;AAGE,IAAA,kBAAkB,EAAC,gBAHrB;AAIE,IAAA,QAAQ,EAAE,kBAACC,KAAD,EAAW;AACnB,UAAIA,KAAK,KAAK,GAAd,EAAmB;AAAA;;AACjB,YAAIC,QAAQ,CAACC,EAAT,KAAgB,KAApB,EACEJ,KAAK,QAAL,8BAAAA,KAAK,CAAEK,OAAP,oCAAgBC,cAAhB,CAA+B;AAAEC,UAAAA,eAAe,EAAE;AAAnB,SAA/B;AACH,OAHD,MAGO;AAAA;;AACL,YAAIJ,QAAQ,CAACC,EAAT,KAAgB,KAApB,EACEJ,KAAK,QAAL,+BAAAA,KAAK,CAAEK,OAAP,qCAAgBC,cAAhB,CAA+B;AAC7BC,UAAAA,eAAe,EAAE;AADY,SAA/B;AAGH;AACF;AAdH,KAgBE,oBAAC,KAAD;AAAO,IAAA,WAAW,EAAC,SAAnB;AAA6B,IAAA,KAAK,EAAC,GAAnC;AAAuC,IAAA,EAAE,EAAE;AAA3C,aAhBF,EAmBE,oBAAC,KAAD;AAAO,IAAA,WAAW,EAAC,SAAnB;AAA6B,IAAA,GAAG,EAAEP,KAAlC;AAAyC,IAAA,KAAK,EAAC,GAA/C;AAAmD,IAAA,EAAE,EAAE;AAAvD,aAnBF,CADF;AAyBD,CA5BM","sourcesContent":["import React from 'react';\nimport { Radio } from 'native-base';\nimport { Platform } from 'react-native';\n\nexport const Example = () => {\n  const myRef = React.useRef({});\n\n  return (\n    <Radio.Group\n      name=\"exampleGroup\"\n      colorScheme=\"success\"\n      accessibilityLabel=\"pick an option\"\n      onChange={(value) => {\n        if (value === '2') {\n          if (Platform.OS !== 'web')\n            myRef?.current?.setNativeProps({ backgroundColor: '#00de0050' });\n        } else {\n          if (Platform.OS !== 'web')\n            myRef?.current?.setNativeProps({\n              backgroundColor: '#fa000050',\n            });\n        }\n      }}\n    >\n      <Radio colorScheme=\"success\" value=\"1\" my={1}>\n        Wrong\n      </Radio>\n      <Radio colorScheme=\"success\" ref={myRef} value=\"2\" my={1}>\n        Right\n      </Radio>\n    </Radio.Group>\n  );\n};\n"]},"metadata":{},"sourceType":"module"}