{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/ugr44lNtDxyUiUtllp4p/Zc4bRHIwzvR2iQQ5IkWv/Revenue_Filter.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({show:\"none\",revenue:\"$0 - $1,000,000\",country:\"US\",email:\"\"});const options=[\"$0 - $100,000\",\"$100,000 - $1,000,000\",\"$0 - $1,000,000\",\"\"];export function withRevenueChange(Component){return props=>{const[store,setStore]=useStore();const handleChange=e=>{setStore(prev=>({...prev,show:store.show,revenue:e.target.value,country:store.country}));};return /*#__PURE__*/_jsx(Component,{...props,onChange:handleChange});};}export function withCountryChange(Component){return props=>{const[store,setStore]=useStore();const handleChange=e=>{// console.log(\"Changed Country: \", e.target.value)\nsetStore(prev=>({...prev,show:store.show,revenue:store.revenue,country:e.target.value}));};return /*#__PURE__*/_jsx(Component,{...props,onChange:handleChange});};}export function withEmailEnter(Component){return props=>{const[store,setStore]=useStore();const handleEmailChange=e=>{const emailAddress=e.target.value;setStore(prev=>({...prev,show:store.show,revenue:e.target.value,country:store.country}));};return /*#__PURE__*/_jsx(Component,{...props,onChange:handleEmailChange});};}export function withShowBooking(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{if(!options.includes(store.revenue)&&store.country===\"US\"){console.log(\"SHOW BOOKING:::::<<<<<<<<\");setStore(prev=>({...prev,show:\"flex\"}));}},[store.revenue]);// console.log(\"STORE on withShowBooking:: \", store)\nprops.className+=\" booking-form\";return /*#__PURE__*/_jsx(Component,{...props,style:{display:`${store.show}`}});};}export function withContentWithBooking(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,style:{display:`${store.show}`}});};}export function withContentNormal(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,style:{display:`${store.show===\"none\"?\"flex\":\"none\"}`}});};}export function withFormClick(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{setStore(prev=>({...prev,show:\"none\",revenue:store.revenue,country:store.country}));},[]);const handleClick=()=>{// console.log(\"STORE:: \", store)\n// console.log(\"Pass revenue to GTM: \", store.revenue)\nwindow.dataLayer&&window.dataLayer.push({dlv_site_revenue:store.revenue});if(!options.includes(store.revenue)&&store.country===\"US\"){console.log(\"SHOW BOOKING:::::<<<<<<<<\");setStore(prev=>({...prev,show:\"flex\"}));}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick,id:\"lead-form-with-revenue\"});};}export function WithSetRevenue(){const[store,setStore]=useStore();return newValue=>{console.log(\"SetReview called::: \",newValue);setStore(prev=>({...prev,show:store.show,revenue:newValue,country:store.country}));// console.log(\"RESET STORE: \", newValue)\n};}export function WithSetCountry(){const[store,setStore]=useStore();return newValue=>{console.log(\"SetReview called::: \",newValue);setStore(prev=>({...prev,country:newValue}));// console.log(\"RESET STORE: \", newValue)\n};}export function WithSetEmail(){const[store,setStore]=useStore();return newValue=>{console.log(\"SetEmail called::: \",newValue);setStore(prev=>({...prev,email:newValue}));// console.log(\"RESET STORE: \", newValue)\n};}export function withEmailPass(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.email});};}export function WithBookingLogic(){const[store,setStore]=useStore();return()=>{// console.log(\"WithBookingLogic Called::: before change-> \", store)\nif(!options.includes(store.revenue)&&store.country===\"US\"){console.log(\"SHOW WITH-BOOKING:::::<<<<<<<<\");setStore(prev=>({...prev,show:\"flex\",revenue:store.revenue,country:store.country}));}// console.log(\"RESET STORE: \", newValue)\n};}export function withShowOnlyUS(Component){return props=>{const[store]=useStore();// Check if the country is \"US\"\nconst isVisible=store.country===\"US\";// If the country is not \"US\", return null to hide the component\nif(!isVisible)return null;// If the country is \"US\", render the component\nreturn /*#__PURE__*/_jsx(Component,{...props});};}export function withShowNonUS(Component){return props=>{const[store]=useStore();// Check if the country is \"US\"\nconst isVisible=store.country!==\"US\";// If the country is not \"US\", return null to hide the component\nif(!isVisible)return null;// If the country is \"US\", render the component\nreturn /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"WithBookingLogic\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailEnter\":{\"type\":\"reactHoc\",\"name\":\"withEmailEnter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithSetEmail\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithSetCountry\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRevenueChange\":{\"type\":\"reactHoc\",\"name\":\"withRevenueChange\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withContentWithBooking\":{\"type\":\"reactHoc\",\"name\":\"withContentWithBooking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithSetRevenue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShowNonUS\":{\"type\":\"reactHoc\",\"name\":\"withShowNonUS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormClick\":{\"type\":\"reactHoc\",\"name\":\"withFormClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailPass\":{\"type\":\"reactHoc\",\"name\":\"withEmailPass\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCountryChange\":{\"type\":\"reactHoc\",\"name\":\"withCountryChange\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withContentNormal\":{\"type\":\"reactHoc\",\"name\":\"withContentNormal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShowOnlyUS\":{\"type\":\"reactHoc\",\"name\":\"withShowOnlyUS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShowBooking\":{\"type\":\"reactHoc\",\"name\":\"withShowBooking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Revenue_Filter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S,GAAU,CAAC,QAAQ,IAAI,uBAAuBA,CAAQ,EAAEV,EAASI,IAAO,CAAC,GAAGA,EAAK,QAAQM,CAAQ,EAAE,CAC/K,CAAE,CAAQ,SAASE,GAAc,CAAC,GAAK,CAACb,EAAMC,CAAQ,EAAEC,EAAS,EAAE,OAAOS,GAAU,CAAC,QAAQ,IAAI,sBAAsBA,CAAQ,EAAEV,EAASI,IAAO,CAAC,GAAGA,EAAK,MAAMM,CAAQ,EAAE,CAC1K,CAAE,CAAQ,SAASG,EAAchB,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,CAAK,EAAEE,EAAS,EAAE,OAAoBI,EAAKR,EAAU,CAAC,GAAGC,EAAM,MAAMC,EAAM,KAAK,CAAC,CAAE,CAAE,CAE5I,SAASe,EAAeC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,CAAK,EAAEC,EAAS,EAElF,OADgBD,EAAM,UAAU,KAEZE,EAAKJ,EAAU,CAAC,GAAGC,CAAK,CAAC,EADxB,IAC0B,CAAE,CAAQ,SAASI,EAAcL,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,CAAK,EAAEC,EAAS,EAEhI,OADgBD,EAAM,UAAU,KAEZE,EAAKJ,EAAU,CAAC,GAAGC,CAAK,CAAC,EADxB,IAC0B,CAAE",
  "names": ["init_ssg_sandbox_shims", "useStore", "createStore", "options", "withRevenueChange", "Component", "props", "store", "setStore", "p", "e", "prev", "withCountryChange", "withShowBooking", "Component", "props", "store", "setStore", "useStore", "ue", "options", "prev", "p", "withContentWithBooking", "withContentNormal", "withFormClick", "WithSetRevenue", "newValue", "WithSetCountry", "WithSetEmail", "withEmailPass", "withShowOnlyUS", "Component", "props", "store", "useStore", "p", "withShowNonUS"]
}
