{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/store.js@^1.0.0", "ssg:https://framerusercontent.com/modules/bp5boGVzhFN5vFDgh8O1/KlXi1MxBdnY4HZqNKb0g/Form_Course_input.js"],
  "sourcesContent": ["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map", "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{var _localStorage_getItem;const storedCourse=(_localStorage_getItem=localStorage.getItem(\"courseName\"))===null||_localStorage_getItem===void 0?void 0:_localStorage_getItem.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:\"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:\"\u10D0\u10D8\u10E0\u10E9\u10D8\u10D4 \u10D9\u10E3\u10E0\u10E1\u10D8\"},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": "qKAAqF,SAASA,EAAYC,E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ore", "newState", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "useStore", "createStore", "Form_Course_Dropdown", "props", "getCourse", "height", "fontSize", "fontFamily", "color", "backgroundColor", "padding", "borderRadius", "borderColor", "borderWidth", "chosenCourse", "setChosenCourse", "ye", "errorMessage", "setErrorMessage", "store", "setStore", "ue", "window", "_localStorage_getItem", "storedCourse", "selectStyle", "u", "event", "p", "addPropertyControls", "ControlType"]
}
