{"version":3,"file":"AuthRedirect.BUsH__Ys.mjs","names":[],"sources":["https:/framerusercontent.com/modules/aRTvpHjqgs5mqohtW105/Yx0OYgrny6yFi6vBr375/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,OAArL,MAAc,CAAC,IAAM,EAAgB,aAAa,QAAQ,mBAAmB,OAAW,IAAiB,EAAO,SAAS,KAAK,EAAM,YAAc,EAAC,EAAE,EAAM,EAAM,QAAwC,EAAK,EAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAW,cAAc,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,CAAC,SAAS,EAAM,SAAS,EAA/J,IAAkK,iCAAoB,EAAU,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,eAAe,aAAa,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAY,QAAQ,MAAM,UAAU,aAAa,GAAK,CAAC"}