{"ast":null,"code":"import Dimensions from \"react-native-web/dist/exports/Dimensions\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport StatusBar from \"react-native-web/dist/exports/StatusBar\";\nexport function isIphoneX() {\n  var dimen = Dimensions.get('window');\n  return Platform.OS === 'ios' && !Platform.isPad && !Platform.isTVOS && (dimen.height === 780 || dimen.width === 780 || dimen.height === 812 || dimen.width === 812 || dimen.height === 844 || dimen.width === 844 || dimen.height === 896 || dimen.width === 896 || dimen.height === 926 || dimen.width === 926);\n}\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n  if (isIphoneX()) {\n    return iphoneXStyle;\n  }\n\n  return regularStyle;\n}\nexport function getStatusBarHeight(safe) {\n  return Platform.select({\n    ios: ifIphoneX(safe ? 44 : 30, 20),\n    android: StatusBar.currentHeight,\n    default: 0\n  });\n}\nexport function getBottomSpace() {\n  return isIphoneX() ? 34 : 0;\n}","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-iphone-x-helper/index.js"],"names":["isIphoneX","dimen","Dimensions","get","Platform","OS","isPad","isTVOS","height","width","ifIphoneX","iphoneXStyle","regularStyle","getStatusBarHeight","safe","select","ios","android","StatusBar","currentHeight","default","getBottomSpace"],"mappings":";;;AAEA,OAAO,SAASA,SAAT,GAAqB;AACxB,MAAMC,KAAK,GAAGC,UAAU,CAACC,GAAX,CAAe,QAAf,CAAd;AACA,SACIC,QAAQ,CAACC,EAAT,KAAgB,KAAhB,IACA,CAACD,QAAQ,CAACE,KADV,IAEA,CAACF,QAAQ,CAACG,MAFV,KAGEN,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAAzC,IACKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAD7C,IAEKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAF7C,IAGKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAH7C,IAIKR,KAAK,CAACO,MAAN,KAAiB,GAAjB,IAAwBP,KAAK,CAACQ,KAAN,KAAgB,GAP9C,CADJ;AAUH;AAED,OAAO,SAASC,SAAT,CAAmBC,YAAnB,EAAiCC,YAAjC,EAA+C;AAClD,MAAIZ,SAAS,EAAb,EAAiB;AACb,WAAOW,YAAP;AACH;;AACD,SAAOC,YAAP;AACH;AAED,OAAO,SAASC,kBAAT,CAA4BC,IAA5B,EAAkC;AACrC,SAAOV,QAAQ,CAACW,MAAT,CAAgB;AACnBC,IAAAA,GAAG,EAAEN,SAAS,CAACI,IAAI,GAAG,EAAH,GAAQ,EAAb,EAAiB,EAAjB,CADK;AAEnBG,IAAAA,OAAO,EAAEC,SAAS,CAACC,aAFA;AAGnBC,IAAAA,OAAO,EAAE;AAHU,GAAhB,CAAP;AAKH;AAED,OAAO,SAASC,cAAT,GAA0B;AAC7B,SAAOrB,SAAS,KAAK,EAAL,GAAU,CAA1B;AACH","sourcesContent":["import { Dimensions, Platform, StatusBar } from 'react-native';\n\nexport function isIphoneX() {\n    const dimen = Dimensions.get('window');\n    return (\n        Platform.OS === 'ios' &&\n        !Platform.isPad &&\n        !Platform.isTVOS &&\n        ((dimen.height === 780 || dimen.width === 780)\n          || (dimen.height === 812 || dimen.width === 812)\n          || (dimen.height === 844 || dimen.width === 844)\n          || (dimen.height === 896 || dimen.width === 896)\n          || (dimen.height === 926 || dimen.width === 926))\n    );\n}\n\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n    if (isIphoneX()) {\n        return iphoneXStyle;\n    }\n    return regularStyle;\n}\n\nexport function getStatusBarHeight(safe) {\n    return Platform.select({\n        ios: ifIphoneX(safe ? 44 : 30, 20),\n        android: StatusBar.currentHeight,\n        default: 0\n    });\n}\n\nexport function getBottomSpace() {\n    return isIphoneX() ? 34 : 0;\n}\n"]},"metadata":{},"sourceType":"module"}