{"version":3,"file":"AuthRedirect.DWqhRBOO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/gLZPB0ARXlvjOrxaNs6J/C2YlBb2ilJuMAeXJc0D4/AuthRedirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";export default function AuthCheck(props){useEffect(()=>{const isAuthenticated=localStorage.getItem(\"authenticated\")===\"true\";if(!isAuthenticated){window.location.href=props.redirectUrl;}},[]);if(!props.visible)return null;return /*#__PURE__*/_jsx(Frame,{width:\"100%\",height:\"100%\",background:\"transparent\",style:{display:\"flex\",flexDirection:\"column\"},children:props.children});}addPropertyControls(AuthCheck,{redirectUrl:{type:ControlType.String,title:\"Redirect URL\",defaultValue:\"/\"},visible:{type:ControlType.Boolean,title:\"Visible\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AuthCheck\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AuthRedirect.map"],"mappings":"qTAAkI,SAAwB,EAAU,EAAM,CAAsL,MAArL,GAAU,IAAI,CAAC,IAAM,EAAgB,aAAa,QAAQ,gBAAgB,GAAG,OAAO,AAAI,IAAiB,EAAO,SAAS,KAAK,EAAM,YAAc,EAAC,CAAE,EAAC,CAAK,EAAM,QAAwC,EAAK,EAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAW,cAAc,MAAM,CAAC,QAAQ,OAAO,cAAc,QAAS,EAAC,SAAS,EAAM,QAAS,EAAC,CAAhK,IAAkK,cAAA,IAA7f,GAA2C,IAA6B,IAA0D,CAA2X,EAAoB,EAAU,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,eAAe,aAAa,GAAI,EAAC,QAAQ,CAAC,KAAK,EAAY,QAAQ,MAAM,UAAU,cAAa,CAAK,CAAC,EAAC"}