{"ast":null,"code":"import * as React from 'react';\nimport Appearance from \"../Appearance\";\nexport default function useColorScheme() {\n  var _React$useState = React.useState(Appearance.getColorScheme()),\n      colorScheme = _React$useState[0],\n      setColorScheme = _React$useState[1];\n\n  React.useEffect(function () {\n    function listener(appearance) {\n      setColorScheme(appearance.colorScheme);\n    }\n\n    Appearance.addChangeListener(listener);\n    return function () {\n      return Appearance.removeChangeListener(listener);\n    };\n  });\n  return colorScheme;\n}","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/exports/useColorScheme/index.js"],"names":["React","Appearance","useColorScheme","_React$useState","useState","getColorScheme","colorScheme","setColorScheme","useEffect","listener","appearance","addChangeListener","removeChangeListener"],"mappings":"AASA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP;AACA,eAAe,SAASC,cAAT,GAA0B;AACvC,MAAIC,eAAe,GAAGH,KAAK,CAACI,QAAN,CAAeH,UAAU,CAACI,cAAX,EAAf,CAAtB;AAAA,MACIC,WAAW,GAAGH,eAAe,CAAC,CAAD,CADjC;AAAA,MAEII,cAAc,GAAGJ,eAAe,CAAC,CAAD,CAFpC;;AAIAH,EAAAA,KAAK,CAACQ,SAAN,CAAgB,YAAY;AAC1B,aAASC,QAAT,CAAkBC,UAAlB,EAA8B;AAC5BH,MAAAA,cAAc,CAACG,UAAU,CAACJ,WAAZ,CAAd;AACD;;AAEDL,IAAAA,UAAU,CAACU,iBAAX,CAA6BF,QAA7B;AACA,WAAO,YAAY;AACjB,aAAOR,UAAU,CAACW,oBAAX,CAAgCH,QAAhC,CAAP;AACD,KAFD;AAGD,GATD;AAUA,SAAOH,WAAP;AACD","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport Appearance from '../Appearance';\nexport default function useColorScheme() {\n  var _React$useState = React.useState(Appearance.getColorScheme()),\n      colorScheme = _React$useState[0],\n      setColorScheme = _React$useState[1];\n\n  React.useEffect(function () {\n    function listener(appearance) {\n      setColorScheme(appearance.colorScheme);\n    }\n\n    Appearance.addChangeListener(listener);\n    return function () {\n      return Appearance.removeChangeListener(listener);\n    };\n  });\n  return colorScheme;\n}"]},"metadata":{},"sourceType":"module"}