var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Spinner=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativePaper=require("react-native-paper");var _reactNativeStatusBarHeight=require("react-native-status-bar-height");var _themed=require("@brightlayer-ui/react-native-components/themed");var _reactNativeComponents=require("@brightlayer-ui/react-native-components");var _jsxFileName="/home/circleci/login-workflow/login-workflow/src/components/Spinner.tsx";var makeStyles=function makeStyles(theme,hasHeader){return _reactNative.StyleSheet.create({overlay:{backgroundColor:theme.dark?'rgba(0,0,0,0.6)':'rgba(255, 255, 255, 0.6)',position:'absolute',top:_reactNative.Platform.OS==='ios'?(0,_reactNativeStatusBarHeight.getStatusBarHeight)()+(hasHeader?56:0):hasHeader?56:0,bottom:0,width:'100%',alignItems:'center',justifyContent:'center'},activityIndicator:{marginBottom:_reactNative.Platform.OS==='ios'?(0,_reactNativeStatusBarHeight.getStatusBarHeight)()+(hasHeader?56:0):hasHeader?56:0},loadingText:{marginTop:16,marginBottom:_reactNative.Platform.OS==='ios'?(0,_reactNativeStatusBarHeight.getStatusBarHeight)()+(hasHeader?56:0):hasHeader?56:0}});};var Spinner=function Spinner(props){var _props$hasHeader=props.hasHeader,hasHeader=_props$hasHeader===void 0?true:_props$hasHeader,loadingText=props.loadingText;var theme=(0,_reactNativePaper.useTheme)(props.theme);var styles=makeStyles(theme,hasHeader);return _react.default.createElement(_reactNativePaper.Portal,{__source:{fileName:_jsxFileName,lineNumber:58,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:styles.overlay,__source:{fileName:_jsxFileName,lineNumber:59,columnNumber:13}},_react.default.createElement(_themed.ThemedActivityIndicator,{animating:true,style:!loadingText?styles.activityIndicator:null,__source:{fileName:_jsxFileName,lineNumber:60,columnNumber:17}}),loadingText&&_react.default.createElement(_reactNativeComponents.Body1,{style:[styles.loadingText],__source:{fileName:_jsxFileName,lineNumber:61,columnNumber:33}},loadingText)));};exports.Spinner=Spinner;
//# sourceMappingURL=Spinner.js.map