var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ToggleButton=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeComponents=require("@brightlayer-ui/react-native-components");var _reactNativePaper=require("react-native-paper");var _themed=require("@brightlayer-ui/react-native-components/themed");var Colors=_interopRequireWildcard(require("@brightlayer-ui/colors"));var _jsxFileName="/home/circleci/login-workflow/login-workflow/src/components/ToggleButton.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(props,theme){return _reactNative.StyleSheet.create({loginButton:{width:'100%',alignSelf:'center',borderRadius:theme.roundness,borderColor:props.disabled?theme.colors.disabled:props.outlined?theme.colors.primary:'transparent'},label:{color:props.disabled?theme.colors.disabled:props.outlined?theme.colors.primary:Colors.white[50]}});};var ToggleButton=function ToggleButton(props){var text=props.text,style=props.style,_props$outlined=props.outlined,outlined=_props$outlined===void 0?false:_props$outlined,_props$disabled=props.disabled,disabled=_props$disabled===void 0?false:_props$disabled,onPress=props.onPress,customTheme=props.theme,testID=props.testID,accessibilityLabel=props.accessibilityLabel;var theme=(0,_reactNativePaper.useTheme)(customTheme);var styles=makeStyles(props,theme);return _react.default.createElement(_themed.ThemedButton,{uppercase:false,mode:outlined?'outlined':'contained',style:[styles.loginButton,style],disabled:disabled,onPress:onPress,testID:testID,accessibilityLabel:accessibilityLabel,__source:{fileName:_jsxFileName,lineNumber:74,columnNumber:9}},_react.default.createElement(_reactNativeComponents.Body1,{color:"text",style:styles.label,__source:{fileName:_jsxFileName,lineNumber:83,columnNumber:13}},text));};exports.ToggleButton=ToggleButton;
//# sourceMappingURL=ToggleButton.js.map