{"version":3,"file":"Form_Course_input.CCRriJsQ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/bp5boGVzhFN5vFDgh8O1/erSMeL9rIQfyxnHVmKZB/Form_Course_input.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{ControlType,addPropertyControls}from\"framer\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more: https://www.framer.com/developers/overrides/\nexport const useStore=createStore({currentCourse:\"\"});export default function Form_Course_Dropdown(props){const{getCourse,height,fontSize,fontFamily,color,backgroundColor,padding,borderRadius,borderColor,borderWidth}=props;const[chosenCourse,setChosenCourse]=useState(\"\");const[errorMessage,setErrorMessage]=useState(\"\");const[store,setStore]=useStore();useEffect(()=>{if(window.history.length===47){localStorage.clear();setChosenCourse(\"chooseCourse\");setErrorMessage(\"\")// Clear error on local storage clear\n;}else{const storedCourse=localStorage.getItem(\"courseName\")?.replace(\" \",\"-\").replace(\"#\",\"-Sharp\");setChosenCourse(storedCourse||\"chooseCourse\");}},[]);useEffect(()=>{localStorage.setItem(\"currentCourse\",chosenCourse);},[chosenCourse]);const selectStyle={height:`40px`,width:\"-webkit-fill-available\",fontSize:`${fontSize}px`,color:color,backgroundColor:backgroundColor,padding:`${padding}px`,borderRadius:`${borderRadius}px`,borderColor:borderColor,borderWidth:`${borderWidth}px`,borderStyle:\"solid\",fontFamily:fontFamily};const handleChangeCourse=event=>{setChosenCourse(event.target.value);setStore({currentCourse:event.target.value});setErrorMessage(\"\")// Clear error message on change\n;};const handleSubmit=()=>{if(chosenCourse===\"\"){setErrorMessage(\"Please select a course.\");}else{setErrorMessage(\"\")// Clear any error if a course is selected\n;// You can also handle form submission here\n}};return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(\"select\",{name:\"course\",id:\"course\",value:chosenCourse,style:selectStyle,onChange:handleChangeCourse,onBlur:handleSubmit,required:true,children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",children:getCourse}),/*#__PURE__*/_jsx(\"option\",{value:\"Full-Stack\",children:\"Full-Stack\"}),/*#__PURE__*/_jsx(\"option\",{value:\"AI-Engineering\",children:\"AI Engineering\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Front-End-React\",children:\"Front-End React\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Next.js\",children:\"Next.js\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Front-End-Angular\",children:\"Front-End Angular\"}),/*#__PURE__*/_jsx(\"option\",{value:\"react-native\",children:\"React-Native\"}),/*#__PURE__*/_jsx(\"option\",{value:\"node-js\",children:\"Back-End Node.js\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Back-End-Python\",children:\"Back-End Python\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Back-End-C-Sharp\",children:\"Back-End C#\"}),/*#__PURE__*/_jsx(\"option\",{value:\"cybersecurity\",children:\"Cyber Security\"}),/*#__PURE__*/_jsx(\"option\",{value:\"roblox\",children:\"Roblox\"})]}),errorMessage&&/*#__PURE__*/_jsx(\"div\",{style:{color:\"red\"},children:errorMessage}),\" \",\"\\\\\"]});}addPropertyControls(Form_Course_Dropdown,{getCourse:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"აირჩიე კურსი\"},height:{type:ControlType.String,title:\"Height\",defaultValue:\"40\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:10,max:36},fontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"Algo-Nus\"},color:{type:ControlType.Color,title:\"Font Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#ffffff\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:8,min:0,max:20},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:4,min:0,max:50},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#cccccc\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"useStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Form_Course_Dropdown\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Form_Course_input.map"],"mappings":"4YACsD,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,YAAU,SAAO,WAAS,aAAW,QAAM,kBAAgB,UAAQ,eAAa,cAAY,cAAY,CAAC,EAAW,CAAC,EAAa,EAAgB,CAACA,EAAS,IAAS,CAAC,EAAa,EAAgB,CAACA,EAAS,IAAS,CAAC,EAAM,EAAS,CAAC,IAAW,MAAc,CAAC,GAAG,EAAO,QAAQ,SAAS,GAAI,aAAa,QAAQ,EAAgB,gBAAgB,EAAgB,QAC/c,CAAC,IAAM,EAAa,aAAa,QAAQ,eAAe,QAAQ,IAAI,KAAK,QAAQ,IAAI,UAAU,EAAgB,GAAc,eAAiB,CAAC,EAAC,EAAE,EAAE,MAAc,CAAC,aAAa,QAAQ,gBAAgB,EAAe,EAAC,CAAC,EAAa,EAAE,IAAM,EAAY,CAAC,OAAO,OAAO,MAAM,yBAAyB,SAAS,GAAG,EAAS,IAAU,QAAsB,kBAAgB,QAAQ,GAAG,EAAQ,IAAI,aAAa,GAAG,EAAa,IAAgB,cAAY,YAAY,GAAG,EAAY,IAAI,YAAY,QAAmB,aAAW,CAAO,EAAmB,GAAO,CAAC,EAAgB,EAAM,OAAO,OAAO,EAAS,CAAC,cAAc,EAAM,OAAO,MAAM,EAAE,EAAgB,GAC7oB,EAAO,MAAiB,CAAuB,EAAnB,IAAe,GAAoB,0BAAiD,GAEhH,EAAC,OAAoB,EAAM,MAAM,CAAC,SAAS,CAAc,EAAM,SAAS,CAAC,KAAK,SAAS,GAAG,SAAS,MAAM,EAAa,MAAM,EAAY,SAAS,EAAmB,OAAO,E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