{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/NF27GMRnRQIwaQZ2G9YY/yEILKTPL9l4PImY26MTI/CreateStore.js", "ssg:https://framerusercontent.com/modules/CuVXhryFic55vNF7kLiY/87Wjc5Dd29Efp7PSI0nn/Stores.js"],
  "sourcesContent": ["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(initialState,options={}){const{localStorageKey}=options;// Try to load persisted state from localStorage if a key is provided\nlet persistedState=initialState;if(localStorageKey&&typeof window!==\"undefined\"){const saved=window.localStorage.getItem(localStorageKey);if(saved){try{persistedState=JSON.parse(saved);}catch(e){// If there's an error parsing, fall back to initialState\nconsole.warn(\"Could not parse persisted state:\",e);}}}// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...persistedState})});// Create a set function that updates the state in Framer\nconst setDataStore=newState=>{if(typeof newState===\"function\"){newState=newState(dataStore.state);}const updated=Object.freeze({...dataStore.state,...newState});dataStore.state=updated;// Save to localStorage if a key is provided\nif(localStorageKey&&typeof window!==\"undefined\"){window.localStorage.setItem(localStorageKey,JSON.stringify(updated));}};// Store initial state outside of Framer Data\nlet storeState=typeof persistedState===\"object\"?Object.freeze({...persistedState}):persistedState;// 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(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all connected React components\nstoreSetters.forEach(setter=>setter(storeState));// Save to localStorage if a key is provided\nif(localStorageKey&&typeof window!==\"undefined\"){window.localStorage.setItem(localStorageKey,JSON.stringify(storeState));}};// The hook that components will use\nfunction useStore(){const[state,setState]=useState(storeState);useEffect(()=>{storeSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Framer\u2019s Data context is available, use that\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Otherwise, return the React-based global state and setter\nreturn[state,setStoreState];}}return useStore;}// import { useState, useEffect } from \"react\"\n// import { Data, useObserveData } from \"framer\"\n// export function createStored(state1) {\n// // Use Data so that a Preview reload resets the state\n// const dataStore = Data({ state: Object.freeze({ ...state1 }) }) // Create a set function that updates the state\n// const setDataStore = (newState) => {\n//     // If the state is an object, make sure we copy it\n//     if (typeof newState === \"function\") {\n//         newState = newState(dataStore.state)\n//     }\n//     dataStore.state = Object.freeze({ ...dataStore.state, ...newState })\n// } // Store the initial state, copy the object if it's an object\n// let storeState =\n//     typeof state1 === \"object\" ? Object.freeze({ ...state1 }) : state1 // Keep a list of all the listeners, in the form of React hook setters\n// const storeSetters = new Set() // Create a set function that updates all the listeners / setters\n// const setStoreState = (newState) => {\n//     // If the state is an object, make sure we copy it\n//     if (typeof newState === \"function\") {\n//         newState = newState(storeState)\n//     }\n//     storeState =\n//         typeof newState === \"object\"\n//             ? Object.freeze({ ...storeState, ...newState })\n//             : newState // Update all the listeners / setters with the new value\n//     storeSetters.forEach((setter) => setter(storeState))\n// } // Create the actual hook based on everything above\n// function useStore() {\n//     // Create the hook we are going to use as a listener\n//     const [state, setState] = useState(storeState) // If we unmount the component using this hook, we need to remove the listener\n//     // @ts-ignore\n//     useEffect(() => {\n//         // But right now, we need to add the listener\n//         storeSetters.add(setState)\n//         return () => storeSetters.delete(setState)\n//     }, []) // If Data context exists, use Data, otherwise use vanilla React state\n//     if (useObserveData() === true) {\n//         useObserveData()\n//         return [dataStore.state, setDataStore]\n//     } else {\n//         // Return the state and a function to update the central store\n//         return [state, setStoreState]\n//     }\n// }\n// return useStore\n// }\n// export const __FramerMetadata__ = {\n//     exports: {\n//         createStore: {\n//             type: \"function\",\n//             annotations: { framerContractVersion: \"1\" },\n//         },\n//         __FramerMetadata__: { type: \"variable\" },\n//     },\n// }\n// # sourceMappingURL=./createStore.map\n\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CreateStore.map", "import{createStore}from\"https://framerusercontent.com/modules/NF27GMRnRQIwaQZ2G9YY/yEILKTPL9l4PImY26MTI/CreateStore.js\";export const useFormSubmissionSessionId=createStore(\"\");export const useBusinessExpectedMonthlyTpv=createStore(\"\");export const returnConfig=formDataName=>{return{name:formDataName,controlledValue:\"\",variant:\"Placeholder\",isRequired:true,isValid:false};};export const useContactFirstName=createStore(returnConfig(\"contactFirstName\"));export const useContactLastName=createStore(returnConfig(\"contactLastName\"));export const useContactEmail=createStore(returnConfig(\"contactEmail\"));export const useContactPhone=createStore(returnConfig(\"contactPhone\"));export const useBusinessName=createStore(returnConfig(\"businessName\"));export const useBusinessZipcode=createStore(returnConfig(\"businessZipcode\"));export const useExpectedMonthlyTpv=createStore(returnConfig(\"businessExpectedMonthlyTpv\"));export const useBusinessRegistrationNumber=createStore(returnConfig(\"businessRegistrationNumber\"));export const useBusinessDescription=createStore(returnConfig(\"businessDescription\"));export const useContactPreferredMethod=createStore(returnConfig(\"contactPreferredMethod\"));export const useQualificationProductsOfInterest=createStore(returnConfig(\"qualificationProductsOfInterest\"));export const useQualificationEcommerceProvider=createStore(returnConfig(\"qualificationEcommerceProvider\"));export const useMerchantLeadForm=createStore(1);\nexport const __FramerMetadata__ = {\"exports\":{\"useBusinessExpectedMonthlyTpv\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useExpectedMonthlyTpv\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFormSubmissionSessionId\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useContactLastName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useQualificationEcommerceProvider\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useBusinessZipcode\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMerchantLeadForm\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useContactPreferredMethod\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useContactFirstName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useBusinessName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useBusinessDescription\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useContactEmail\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useBusinessRegistrationNumber\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useQualificationProductsOfInterest\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useContactPhone\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"returnConfig\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Stores.map"],
  "mappings": "yIAAqF,SAASA,EAAYC,EAAaC,EAAQ,CAAC,EAAE,CAAC,GAAK,CAAC,gBAAAC,CAAe,EAAED,EACtJE,EAAeH,EAAa,GAAGE,GAAiB,OAAOE,EAAS,IAAY,CAAC,IAAMC,EAAMD,EAAO,aAAa,QAAQF,CAAe,EAAE,GAAGG,EAAO,GAAG,CAACF,EAAe,KAAK,MAAME,CAAK,CAAE,OAAOC,EAAN,CAC1L,QAAQ,KAAK,mCAAmCA,CAAC,CAAE,EACnD,IAAMC,EAAUC,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGL,CAAc,CAAC,CAAC,CAAC,EACzDM,EAAaC,GAAU,CAAI,OAAOA,GAAW,aAAYA,EAASA,EAASH,EAAU,KAAK,GAAG,IAAMI,EAAQ,OAAO,OAAO,CAAC,GAAGJ,EAAU,MAAM,GAAGG,CAAQ,CAAC,EAAEH,EAAU,MAAMI,EAC9KT,GAAiB,OAAOE,EAAS,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EAAa,4BAA4B,CAAC,EAAeU,EAAuBZ,EAAYE,EAAa,qBAAqB,CAAC,EAAeW,EAA0Bb,EAAYE,EAAa,wBAAwB,CAAC,EAAeY,EAAmCd,EAAYE,EAAa,iCAAiC,CAAC,EAAea,EAAkCf,EAAYE,EAAa,gCAAgC,CAAC,EAAec,EAAoBhB,EAAY,CAAC",
  "names": ["createStore", "initialState", "options", "localStorageKey", "persistedState", "window", "saved", "e", "dataStore", "Data", "setDataStore", "newState", "updated", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "useFormSubmissionSessionId", "createStore", "useBusinessExpectedMonthlyTpv", "returnConfig", "formDataName", "useContactFirstName", "useContactLastName", "useContactEmail", "useContactPhone", "useBusinessName", "useBusinessZipcode", "useExpectedMonthlyTpv", "useBusinessRegistrationNumber", "useBusinessDescription", "useContactPreferredMethod", "useQualificationProductsOfInterest", "useQualificationEcommerceProvider", "useMerchantLeadForm"]
}
