var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LoginHeaderSplash=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativePaper=require("react-native-paper");var Colors=_interopRequireWildcard(require("@brightlayer-ui/colors"));var _reactAuthShared=require("@brightlayer-ui/react-auth-shared");var _jsxFileName="/home/circleci/login-workflow/login-workflow/src/components/LoginHeaderSplash.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var makeStyles=function makeStyles(){return _reactNative.StyleSheet.create({headerImageContainer:{width:'70%',maxWidth:351,height:90,flex:1,justifyContent:'center',marginHorizontal:16,marginTop:'1%'},headerImage:{width:'100%',resizeMode:'contain'},splashBackgroundImage:{position:'absolute',top:0,left:0,bottom:8,padding:8,width:'100%',height:'30%',overflow:'hidden',resizeMode:'cover',flex:1,justifyContent:'center',zIndex:-1}});};var LoginHeaderSplash=function LoginHeaderSplash(props){var _background$backgroun,_background$backgroun2,_background$backgroun3;var style=props.style,mainImage=props.mainImage;var _useInjectedUIContext=(0,_reactAuthShared.useInjectedUIContext)(),_useInjectedUIContext2=_useInjectedUIContext.background,background=_useInjectedUIContext2===void 0?{}:_useInjectedUIContext2;var theme=(0,_reactNativePaper.useTheme)();var styles=makeStyles();return _react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_reactNative.View,{style:[style],__source:{fileName:_jsxFileName,lineNumber:72,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:[styles.headerImageContainer],__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:17}},_react.default.createElement(_reactNative.Image,{resizeMethod:"resize",source:mainImage!==null&&mainImage!==void 0?mainImage:require('../assets/images/eaton_stacked_logo.png'),style:styles.headerImage,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:21}}))),_react.default.createElement(_reactNative.Image,{resizeMethod:"resize",source:(_background$backgroun=background.backgroundImage)!==null&&_background$backgroun!==void 0?_background$backgroun:require('../assets/images/normal-background.png'),style:[styles.splashBackgroundImage,{backgroundColor:(_background$backgroun2=background.backgroundColor)!==null&&_background$backgroun2!==void 0?_background$backgroun2:'transparent',height:(_background$backgroun3=background.backgroundSize)!==null&&_background$backgroun3!==void 0?_background$backgroun3:'30%',tintColor:background.backgroundImage?undefined:theme.dark?Colors.gray[800]:Colors.gray[50]}],__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:13}}));};exports.LoginHeaderSplash=LoginHeaderSplash;
//# sourceMappingURL=LoginHeaderSplash.js.map