{"version":3,"file":"OSswitcher.Uo7FvjkZ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/ij6Bj08XMNN9WOkJmsSU/QzVSusJl2hBywEuASnQV/Google_Tag_Manager.js","https:/framerusercontent.com/modules/X2zzsoS643fdOXIgU0rb/wsS5KL8uaWFHtPBSuKvh/OSswitcher.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// Learn more: https://www.framer.com/developers/overrides/\n//In order to use Google Tag Manager properly with the same old triggers, we need to override the class names\n// Reusable base function to add class names\nfunction withClassName(Component,classNameToAdd){return props=>{const updatedClassName=`${props.className||\"\"} ${classNameToAdd}`.trim();return /*#__PURE__*/_jsx(Component,{...props,className:updatedClassName});};}// 🍏 Apple App Store Button\nexport function addAppAppleClass(Component){return withClassName(Component,\"appApple\");}// 🤖 Google Play Button\nexport function addAppPlayClass(Component){return withClassName(Component,\"appPlay\");}// 🌱 Huawei Button -> will not be used in the future, so it's likely redundand\nexport function addAppHuaweiClass(Component){return withClassName(Component,\"appHuawei\");}// PopUp Button -> for the PopUp that appears when people open the popup to be prompted\nexport function addPopUpClass(Component){return withClassName(Component,\"popUp\");}\nexport const __FramerMetadata__ = {\"exports\":{\"addAppHuaweiClass\":{\"type\":\"reactHoc\",\"name\":\"addAppHuaweiClass\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addAppAppleClass\":{\"type\":\"reactHoc\",\"name\":\"addAppAppleClass\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addPopUpClass\":{\"type\":\"reactHoc\",\"name\":\"addPopUpClass\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addAppPlayClass\":{\"type\":\"reactHoc\",\"name\":\"addAppPlayClass\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Google_Tag_Manager.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n */export function OSswitcher({windowsVersion,macVersion,iosVersion,androidVersion,backgroundColor,cornerRadius,overflow}){const[currentOS,setCurrentOS]=useState(\"Unknown\");const[dimensions,setDimensions]=useState({height:100,width:100});// Utility function to detect the OS\nconst detectOS=()=>{const userAgent=window.navigator.userAgent||window.navigator.vendor||window.opera;// Windows\nif(userAgent.indexOf(\"Win\")!==-1){return\"Windows\";}// macOS\nif(userAgent.indexOf(\"Mac\")!==-1&&!userAgent.includes(\"iPhone\")&&!userAgent.includes(\"iPad\")){return\"macOS\";}// iOS (iPhone, iPad)\nif(/iPad|iPhone|iPod/.test(userAgent)&&!window.MSStream){return\"iOS\";}// Android\nif(/android/i.test(userAgent)){return\"Android\";}// Default case\nreturn\"Unknown\";};// Detect the OS on component mount\nuseEffect(()=>{const os=detectOS();setCurrentOS(os);},[]);// Adjust dimensions based on available versions\nuseEffect(()=>{if(windowsVersion||macVersion||iosVersion||androidVersion){setDimensions({height:\"auto\",width:\"auto\"});}else{setDimensions({height:100,width:100});}},[windowsVersion,macVersion,iosVersion,androidVersion]);return /*#__PURE__*/_jsxs(\"div\",{style:{height:dimensions.height,width:dimensions.width,backgroundColor,borderRadius:cornerRadius,overflow:overflow},children:[currentOS===\"Windows\"&&/*#__PURE__*/_jsx(\"div\",{width:\"100%\",height:\"100%\",children:windowsVersion}),currentOS===\"macOS\"&&/*#__PURE__*/_jsx(\"div\",{width:\"100%\",height:\"100%\",children:macVersion}),currentOS===\"iOS\"&&/*#__PURE__*/_jsx(\"div\",{width:\"100%\",height:\"100%\",children:iosVersion}),currentOS===\"Android\"&&/*#__PURE__*/_jsx(\"div\",{width:\"100%\",height:\"100%\",children:androidVersion}),currentOS===\"Unknown\"&&/*#__PURE__*/_jsx(\"div\",{width:\"100%\",height:\"100%\",children:/*#__PURE__*/_jsx(\"p\",{children:\"Operating System not recognized.\"})})]});}addPropertyControls(OSswitcher,{windowsVersion:{type:ControlType.ComponentInstance,title:\"Windows Version\"},macVersion:{type:ControlType.ComponentInstance,title:\"macOS Version\"},iosVersion:{type:ControlType.ComponentInstance,title:\"iOS Version\"},androidVersion:{type:ControlType.ComponentInstance,title:\"Android Version\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"transparent\"},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:0},overflow:{type:ControlType.Enum,title:\"Overflow\",options:[\"visible\",\"hidden\"],optionTitles:[\"Visible\",\"Hidden\"],defaultValue:\"visible\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"OSswitcher\":{\"type\":\"reactComponent\",\"name\":\"OSswitcher\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OSswitcher.map"],"mappings":"kMAGA,SAAS,EAAc,EAAU,EAAe,CAAC,MAAO,IAAO,CAAC,IAAM,EAAiB,GAAG,EAAM,WAAW,GAAG,GAAG,IAAiB,MAAM,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAiB,CAAC,EAClN,SAAgB,EAAiB,EAAU,CAAC,OAAO,EAAc,EAAU,WAAW,CACtF,SAAgB,EAAgB,EAAU,CAAC,OAAO,EAAc,EAAU,UAAU,CAEpF,SAAgB,EAAc,EAAU,CAAC,OAAO,EAAc,EAAU,QAAQ,kBAPrC,ICExC,SAAgB,EAAW,CAAC,iBAAe,aAAW,aAAW,iBAAe,kBAAgB,eAAa,YAAU,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,UAAU,CAAM,CAAC,EAAW,GAAeA,EAAS,CAAC,OAAO,IAAI,MAAM,IAAI,CAAC,CACvO,MAAa,CAAC,IAAM,EAAU,EAAO,UAAU,WAAW,EAAO,UAAU,QAAQ,EAAO,MAKhG,OAJG,EAAU,QAAQ,MAAM,GAAG,GAC3B,EAAU,QAAQ,MAAM,GAAG,IAAI,CAAC,EAAU,SAAS,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