{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/5od71RrbPHSuc1b0d0cI/TNXZODVdAwWfCMPVT0ZM/AuthForm.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/docs/guides/\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import styled,{keyframes}from\"styled-components\";// function Spinner2() {\n//     // TODO:\n//     // - add loading icon\n//     // - add css styles to spin icon\n//     return <Spinner />\n// }\nfunction PasswordInput(){return /*#__PURE__*/ _jsx(\"div\",{style:rowContainer,children:/*#__PURE__*/ _jsxs(\"div\",{style:inputContainer,children:[/*#__PURE__*/ _jsx(\"label\",{htmlFor:\"password\",style:labelStyle,children:\"Password\"}),/*#__PURE__*/ _jsx(\"input\",{type:\"password\",id:\"password\",style:inputStyle,placeholder:\"password\"})]})});}/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/docs/guides/auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function AuthForm(props){// - Find inspiration: https://www.framer.com/developers/\nconst[isLoggingIn,setIsLoggingIn]=useState(false);const[isError,setIsError]=useState(false);const btnTitle=props.button.title||\"Title\";const handleLogin=async e=>{e.preventDefault();await setIsLoggingIn(true);window.setTimeout(async()=>{await setIsError(true);await setIsLoggingIn(false);},1200);};return /*#__PURE__*/ _jsx(\"div\",{style:containerStyle,id:\"login-form\",children:/*#__PURE__*/ _jsxs(\"form\",{// To learn more about styling see:\n// https://reactjs.org/docs/dom-elements.html#style\nstyle:formContainer,id:\"loginForm\",children:[/*#__PURE__*/ _jsx(\"div\",{style:rowContainer,children:/*#__PURE__*/ _jsxs(\"div\",{style:inputContainer,children:[/*#__PURE__*/ _jsx(\"label\",{htmlFor:\"email\",style:labelStyle,children:\"Email\"}),/*#__PURE__*/ _jsx(\"input\",{type:\"text\",id:\"email\",style:inputStyle,placeholder:\"example@email.com\"})]})}),props.password?/*#__PURE__*/ _jsx(PasswordInput,{}):null,isError?/*#__PURE__*/ _jsx(\"p\",{style:{color:\"red\"},children:props.errorMessage}):null,/*#__PURE__*/ _jsx(\"button\",{type:\"submit\",onClick:e=>handleLogin(e),style:{...buttonStyles,background:props.button.colour,borderRadius:`${props.button.radius||6}px`},children:isLoggingIn?/*#__PURE__*/ _jsx(Spinner,{}):btnTitle})]})});};// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",display:\"flex\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};const formContainer={borderRadius:\"50px\",width:\"100%\"};const inputStyle={borderRadius:\"6px\",padding:\"10px\",width:\"100%\",border:\"1px solid #EFF0F6\"};const inputContainer={display:\"flex\",flexDirection:\"column\",width:\"100%\",paddingBottom:\"20px\"};const labelStyle={marginBottom:\"10px\",fontSize:\"16px\"};const rowContainer={display:\"flex\",width:\"100%\",justifyContent:\"space-between\"};const buttonStyles={background:\"#000\",border:\"none\",color:\"white\",padding:\"10px 20px\",borderRadius:\"10px\",fontSize:\"16px\",textAlign:\"center\",width:\"100%\"};AuthForm.defaultProps={password:true,errorMessage:\"Error\"};addPropertyControls(AuthForm,{button:{type:ControlType.Object,controls:{title:{type:ControlType.String},colour:{type:ControlType.Color},radius:{type:ControlType.Number}}},password:{title:\"Password\",type:ControlType.Boolean},errorMessage:{title:\"Text\",type:ControlType.String}});const spin=keyframes`\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n`;const Spinner=styled.div`\n  border: 3px solid #f3f3f3;\n  border-top: 3px solid #3498db;\n  border-radius: 50%;\n  width: 20px;\n  height: 20px;\n  animation: ${spin} 1s linear infinite;\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AuthForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1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,EAAQK,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAMRF;",
  "names": ["PasswordInput", "p", "rowContainer", "u", "inputContainer", "labelStyle", "inputStyle", "AuthForm", "props", "isLoggingIn", "setIsLoggingIn", "ye", "isError", "setIsError", "btnTitle", "handleLogin", "e", "window", "containerStyle", "formContainer", "buttonStyles", "Spinner", "addPropertyControls", "ControlType", "spin", "Ue", "He"]
}
