{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/lFJ71z6aXx7R90728AQ5/u7A0heNpI0pLUDrYvKml/AppStateOverride.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({selectedOrderMethod:\"Pickup\",isOpen:false});const getCookie=name=>{if(typeof document===\"undefined\")return\"{}\";let value=`; ${document.cookie}`;const parts=value.split(`; ${name}=`);if(parts.length===2)return parts.pop().split(\";\").shift();return\"{}\";};export const getLfgDefaults=()=>{try{return JSON.parse(getCookie(\"lfg_defaults\"));}catch(e){}return{};};const isReturningGuest=()=>{const defaults=getLfgDefaults();if(defaults===null||defaults===void 0?void 0:defaults.locationSlug){return true;}return false;};export function withOnClick(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{if(!(props===null||props===void 0?void 0:props.title))return;console.log(\"Desired method (props.title)=\",props===null||props===void 0?void 0:props.title);console.log(\"Current method (store.selectedOrderMethod)=\",store===null||store===void 0?void 0:store.selectedOrderMethod);if(props.title==store.selectedOrderMethod){return;}setStore({...store,selectedOrderMethod:props.title});},selectedOrderMethod:store.selectedOrderMethod,setOrderMethod:val=>setStore({...store,selectedOrderMethod:val})});};}export function withTextOverride(Component){return props=>{const[store,setStore]=useStore();let _text=\"Enter your zipcode\";if(store.selectedOrderMethod==\"Delivery\"){_text=\"Enter your address\";}return /*#__PURE__*/_jsx(Component,{...props,text:_text});};}export function getVariant(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,variant:store.selectedOrderMethod});};}/**\n * Used in the UI that picks the order method\n */export function getVariantAndDisplay(Component){return props=>{const[store,setStore]=useStore();const returning=isReturningGuest();console.log(\"Variant (store.selectedOrderMethod)=\",store===null||store===void 0?void 0:store.selectedOrderMethod);return /*#__PURE__*/_jsx(Component,{...props,variant:store.selectedOrderMethod,style:{display:returning?\"none\":\"default\"}});};}/** REMOVE AFTER CONFIRMING NOT USED */export function withSelectedOrderMethod(Component){return props=>{const[store,setStore]=useStore();const setOrderMethod=orderMethod=>{setStore({...store,selectedOrderMethod:orderMethod});};return /*#__PURE__*/_jsx(Component,{...props,selectedOrderMethod:store.selectedOrderMethod,setOrderMethod:setOrderMethod});};}/**\n * Used in the zip code and delivery address input\n */export function withSelectedOrderMethodAndDisplay(Component){return props=>{const[store,setStore]=useStore();const setOrderMethod=orderMethod=>{setStore({...store,selectedOrderMethod:orderMethod});};return /*#__PURE__*/_jsx(Component,{...props,selectedOrderMethod:store.selectedOrderMethod,setOrderMethod:setOrderMethod});};}export function withOnOpen(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{setTimeout(()=>{window.scrollTo(0,-50);window.top.scroll(0,-50);window.scroll(0,-50);},1,true);setTimeout(()=>{setStore({...store,isOpen:true});},10,true);}});};}export function withOnOpenVariant(Component){return props=>{const[store,setStore]=useStore();const returning=isReturningGuest();if(returning){return null;}return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{setTimeout(()=>{if(typeof window!==\"undefined\"){window.scrollTo(0,-50);window.top.scroll(0,-50);window.scroll(0,-50);}},1,true);setTimeout(()=>{setStore({...store,isOpen:true});},10,true);}});};}export function withMobileOrderMethod(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,isOpen:store.isOpen,setIsOpen:val=>setStore({...store,isOpen:val}),selectedOrderMethod:store.selectedOrderMethod,setOrderMethod:val=>{setStore({...store,selectedOrderMethod:val});}});};}export function withNavigateVariant(Component){return props=>{const defaults=getLfgDefaults();let link=\"http://order.localkitchens.com/\";let show=false;if(defaults===null||defaults===void 0?void 0:defaults.locationSlug){show=true;link+=`store/${defaults===null||defaults===void 0?void 0:defaults.locationSlug}/popular`;if(defaults===null||defaults===void 0?void 0:defaults.orderType){var _defaults_orderType;let isDelivery=(defaults===null||defaults===void 0?void 0:(_defaults_orderType=defaults.orderType)===null||_defaults_orderType===void 0?void 0:_defaults_orderType.toLowerCase())===\"delivery\";link+=`?is-delivery=${isDelivery?\"true\":\"false\"}`;}}if(!show){return null;}return /*#__PURE__*/_jsx(Component,{...props,href:link});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withNavigateVariant\":{\"type\":\"reactHoc\",\"name\":\"withNavigateVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOnOpenVariant\":{\"type\":\"reactHoc\",\"name\":\"withOnOpenVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariant\":{\"type\":\"reactHoc\",\"name\":\"getVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariantAndDisplay\":{\"type\":\"reactHoc\",\"name\":\"getVariantAndDisplay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSelectedOrderMethodAndDisplay\":{\"type\":\"reactHoc\",\"name\":\"withSelectedOrderMethodAndDisplay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSelectedOrderMethod\":{\"type\":\"reactHoc\",\"name\":\"withSelectedOrderMethod\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTextOverride\":{\"type\":\"reactHoc\",\"name\":\"withTextOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getLfgDefaults\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileOrderMethod\":{\"type\":\"reactHoc\",\"name\":\"withMobileOrderMethod\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOnOpen\":{\"type\":\"reactHoc\",\"name\":\"withOnOpen\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOnClick\":{\"type\":\"reactHoc\",\"name\":\"withOnClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AppStateOverride.map"],
  "mappings": "6EAAgH,IAAMA,EAASC,EAAY,CAAC,oBAAoB,SAAS,OAAO,EAAK,CAAC,EAAQC,EAAUC,GAAM,CAAC,GAAG,OAAO,SAAW,IAAY,MAAM,KAAsC,IAAMC,EAA7B,KAAK,SAAS,MAAM,GAAqB,MAAM,KAAKD,CAAI,GAAG,EAAE,OAAGC,EAAM,SAAS,EAASA,EAAM,IAAI,EAAE,MAAM,GAAG,EAAE,MAAM,EAAQ,IAAK,EAAeC,EAAe,IAAI,CAAC,GAAG,CAAC,OAAO,KAAK,MAAMH,EAAU,cAAc,CAAC,CAAE,MAAS,CAAC,CAAC,MAAM,CAAC,CAAE,EAI0iB,SAASI,EAAsBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAS,EAAE,OAAoBC,EAAKL,EAAU,CAAC,GAAGC,EAAM,OAAOC,EAAM,OAAO,UAAUI,GAAKH,EAAS,CAAC,GAAGD,EAAM,OAAOI,CAAG,CAAC,EAAE,oBAAoBJ,EAAM,oBAAoB,eAAeI,GAAK,CAACH,EAAS,CAAC,GAAGD,EAAM,oBAAoBI,CAAG,CAAC,CAAE,CAAC,CAAC,CAAE,CAAE,CAAQ,SAASC,EAAoBP,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAMO,EAASC,EAAe,EAAMC,EAAK,kCAAsCC,EAAK,GAAM,GAA6CH,GAAS,eAAcG,EAAK,GAAKD,GAAM,SAAmDF,GAAS,YAAY,WAAwDA,GAAS,WAAU,CAAC,IAAII,EAAoB,IAAIC,GAAYL,GAAW,OAAgCI,EAAoBJ,EAAS,aAAa,MAAMI,IAAsB,OAA9E,OAA4FA,EAAoB,YAAY,KAAK,WAAWF,GAAM,gBAAgBG,EAAW,OAAO,OAAO,EAAG,CAAE,OAAIF,EAAuCN,EAAKL,EAAU,CAAC,GAAGC,EAAM,KAAKS,CAAI,CAAC,EAA7D,IAA+D,CAAE",
  "names": ["useStore", "createStore", "getCookie", "name", "parts", "getLfgDefaults", "withMobileOrderMethod", "Component", "props", "store", "setStore", "useStore", "p", "val", "withNavigateVariant", "defaults", "getLfgDefaults", "link", "show", "_defaults_orderType", "isDelivery"]
}
