{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/KVKJfKwX1qrdSfPVzobB/9ODhTNIxiNIm4ztWeqxP/PasswordNew.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{Frame,addPropertyControls,ControlType,useNavigate}from\"framer\";export function PasswordWall(props){const{password,redirectURL,backgroundColor,textColor,fontSize,buttonColor,buttonTextColor}=props;const[inputPassword,setInputPassword]=useState(\"\");const[error,setError]=useState(\"\");const[isActive,setIsActive]=useState(true);const navigate=useNavigate()// Framer navigation hook\n;// Disable scrolling when the PasswordWall is active\nuseEffect(()=>{if(isActive){document.body.style.overflow=\"hidden\";}else{document.body.style.overflow=\"auto\";}// Cleanup on unmount\nreturn()=>{document.body.style.overflow=\"auto\";};},[isActive]);const handlePasswordSubmit=()=>{if(inputPassword===password){setIsActive(false);navigate(redirectURL)// Use Framer's navigate for internal routing\n;}else{setError(\"Incorrect password. Please try again.\");}};if(!isActive){return null// Hide the PasswordWall once the password is correct\n;}return /*#__PURE__*/_jsxs(Frame,{background:backgroundColor,width:\"100%\",height:\"100%\",style:{display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",color:textColor,textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"h1\",{style:{fontSize},children:\"Please Enter Password\"}),/*#__PURE__*/_jsx(\"input\",{type:\"password\",placeholder:\"Password\",style:{padding:\"10px\",fontSize,border:\"1px solid #ccc\",borderRadius:\"4px\",margin:\"10px 0\"},value:inputPassword,onChange:e=>{setInputPassword(e.target.value);setError(\"\");}}),error&&/*#__PURE__*/_jsx(\"p\",{style:{color:\"red\",fontSize:\"14px\"},children:error}),/*#__PURE__*/_jsx(\"button\",{style:{padding:\"10px 20px\",fontSize,backgroundColor:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:\"4px\",cursor:\"pointer\"},onClick:handlePasswordSubmit,children:\"Submit\"})]});}// Add property controls for customization\naddPropertyControls(PasswordWall,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"1234\"},redirectURL:{type:ControlType.String,title:\"Redirect URL\",defaultValue:\"/protected\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#ffffff\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:10,max:30},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#007BFF\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text Color\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"PasswordWall\":{\"type\":\"reactComponent\",\"name\":\"PasswordWall\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PasswordNew.map"],
  "mappings": "+HAAAA,IAA4K,SAASC,EAAaC,EAAM,CAAC,GAAK,CAAC,SAAAC,EAAS,YAAAC,EAAY,gBAAAC,EAAgB,UAAAC,EAAU,SAAAC,EAAS,YAAAC,EAAY,gBAAAC,CAAe,EAAEP,EAAW,CAACQ,EAAcC,CAAgB,EAAEC,EAAS,EAAE,EAAO,CAACC,EAAMC,CAAQ,EAAEF,EAAS,EAAE,EAAO,CAACG,EAASC,CAAW,EAAEJ,EAAS,EAAI,EAAQK,EAASC,EAAY,EAEtcC,EAAU,KAAQJ,EAAU,SAAS,KAAK,MAAM,SAAS,SAAe,SAAS,KAAK,MAAM,SAAS,OAC/F,IAAI,CAAC,SAAS,KAAK,MAAM,SAAS,MAAO,GAAI,CAACA,CAAQ,CAAC,EAAE,IAAMK,EAAqB,IAAI,CAAIV,IAAgBP,GAAUa,EAAY,EAAK,EAAEC,EAASb,CAAW,GAC5JU,EAAS,uCAAuC,CAAG,EAAE,OAAIC,EAC1C,EAAMM,EAAM,CAAC,WAAWhB,EAAgB,MAAM,OAAO,OAAO,OAAO,MAAM,CAAC,QAAQ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URL", "backgroundColor", "textColor", "fontSize", "buttonColor", "buttonTextColor", "inputPassword", "setInputPassword", "ye", "error", "setError", "isActive", "setIsActive", "navigate", "useNavigate", "ue", "handlePasswordSubmit", "Frame", "p", "e", "addPropertyControls", "ControlType"]
}
