{"version":3,"file":"orderStore.O-C4uAmE.mjs","names":[],"sources":["https:/framerusercontent.com/modules/R2qhE9FOEfzlnuHdbUzc/GULajips8VEHCMHND7NP/orderStore.js"],"sourcesContent":["import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const isBrowser=typeof window!==\"undefined\";const initialState={isCompany:false,previousProducts:[],homeTypes:[],premisesTypes:[],selectedHomeType:null,selectedPremisesType:null,windowProducts:[],showSelectedWindows:false,windowVariants:[],selectedWindowVariant:null,selectedWindowVariantAmount:null,loading:false,address:{id:null,api_id:null,name:\"\",attr:{}},offers:[],selectedSingleService:null,selectedSubscriptionMethod:null,selectedSubscriptionInterval:null,hasFront:null,addons:[],selectedAddonId:null,termsAccepted:false,termsError:false,validationPrice:isBrowser?localStorage.getItem(\"validation_price\"):null,validationDate:isBrowser?localStorage.getItem(\"validation_date\"):null,note:null,confirmWindowCheck:false,confirmWindowError:false,subscriptionNote:null,selectedSubscriptionAddonType:null,selectedSubscriptionAddonAmount:\"subscription\",subscriptionAddons:[],withSubscriptionFee:false,selectedWaitingListDate:null,waitingListNote:null};export const useOrderStore=createStore(initialState);const useReferenceStore=createStore({referenceId:null});export function useOrder(){const[store,setStore]=useOrderStore();const[referenceStore,setReferenceStore]=useReferenceStore();const resetOrder=()=>{setStore({...initialState,windowProducts:store.windowProducts,homeTypes:store.homeTypes,premisesTypes:store.premisesTypes,isCompany:store.isCompany});localStorage.removeItem(\"validation_price\");localStorage.removeItem(\"validation_date\");};const setValidationData=data=>{setStore({validationPrice:data.validation_price,validationDate:data.datetime});localStorage.setItem(\"validation_price\",data.validation_price);localStorage.setItem(\"validation_date\",data.datetime);};return{...store,...referenceStore,setStore,resetOrder,setValidationData,setReferenceStore};}\nexport const __FramerMetadata__ = {\"exports\":{\"useOrder\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOrderStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\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