import{D as N,I as h,z as m,l as A,s as C,J as E,e as T,b as V,d as $,_ as j,o,f,w as r,r as n,a as t,g as s,h as u,c as a,j as l,T as B,F as H,i as S,p as F,k as L}from"./index-696ae00c.js";import{c as P,e as z}from"./shack-b01f3a06.js";import{c as J}from"./scenery-598a2fc0.js";import{s as O}from"./decor-49f6dcaf.js";import"./decor-1d29d0cd.js";import"./decor-99fcb426.js";import"./decor-7373f20c.js";async function R(){const e=N(h.warehouse().IDs);var i={};return m.warehouse().goal_picked&&(i=m.warehouse().goal.emblem),await A({path:"guests",envelope:{label:"retrieve recipe",freight:{goods:e,goal:i}}})}const U={components:{cautionary_ingredients:P,change_indicator:J,s_button:C,router_link_scenery:E,essential_nutrients:z,s_food_or_supp_summary:O},data(){return{recipe:{},showing:"stats",show_recipe:!1}},methods:{_get:T,async open_list(){console.log("open_list"),this.showing="list"},open_stats(){this.showing="stats"},async open_empty(){await V({label:"cart",field:$(()=>import("./field-d737b564.js"),["assets/field-d737b564.js","assets/index-696ae00c.js","assets/index-b19033bc.css"])})},async retrieve_recipe(){const{status:e,parsed:i,proceeds:_}=await R();if(e!==200){console.error("The food was not found."),this.found=!1,this.show_recipe=!0;return}this.recipe=_.freight,this.found=!0,this.show_recipe=!0}},async mounted(){this.cart_monitor=h.monitor(({inaugural:e,field:i})=>{const _=h.warehouse();console.log("monitor function",{inaugural:e,field:i,warehouse:_}),this.show_recipe=!1,e||this.retrieve_recipe()}),this.show_recipe=!1,this.retrieve_recipe()},beforeUnmount(){this.cart_monitor.stop()}};const q=U,p=e=>(F("data-v-46be2d32"),e=e(),L(),e),G=p(()=>t("section",{style:{textAlign:"center",padding:"20px 0 20px 0"}},[t("p",null,"Apologies, currently none of these goods are for sale."),t("div",{style:{height:"10px"}}),t("p",null,"However, some of them might have links to stores that have inventory.")],-1)),K={"cart-options":"",style:{display:"flex",justifyContent:"space-between",padding:"10px 0 20px 0"}},M={style:{display:"flex",justifyContent:"space-between",padding:"10px 50px 20px"}},Q=p(()=>t("div",{style:{width:"20px"}},null,-1)),W={style:{display:"flex",justifyContent:"space-between",padding:"10px 50px 20px"}},X={key:0,"cart-content":"",style:{position:"relative",minHeight:"800px"}},Y={key:0},Z=p(()=>t("div",{style:{height:"10px",width:"10px"}},null,-1)),ee={key:1},te=p(()=>t("div",{style:{height:"5px"}},null,-1)),se=p(()=>t("div",{style:{height:"5px"}},null,-1)),oe={key:0,style:{padding:".5in",textAlign:"center"}},ne=p(()=>t("p",null,"The grocery list is empty.",-1)),ie=[ne];function re(e,i,_,ae,pe,le){const d=n("s_button"),g=n("change_indicator"),y=n("cautionary_ingredients"),w=n("essential_nutrients"),v=n("s_food_or_supp_summary"),b=n("s_line"),x=n("s_panel"),k=n("lounge");return o(),f(k,null,{default:r(({palette:_e,terrain:ce,cart:c})=>[G,t("div",K,[t("div",M,[s(d,{ref:"button",boundaries:"8px 20px 8px",pressable:e.showing!=="stats",clicked:e.open_stats},{default:r(()=>[u("stats")]),_:1},8,["pressable","clicked"]),Q,s(d,{ref:"button",boundaries:"8px 20px 8px",pressable:e.showing!=="list",clicked:e.open_list},{default:r(()=>[u("list")]),_:1},8,["pressable","clicked"])]),t("div",W,[s(d,{ref:"button",pressable:!0,clicked:e.open_empty,boundaries:"8px 20px 8px"},{default:r(()=>[u("empty")]),_:1},8,["clicked"])])]),e.showing==="stats"?(o(),a("div",X,[s(g,{show:e.show_recipe===!1,style:{position:"absolute",height:"100vh",top:0,left:0,width:"100vw"}},null,8,["show"]),s(B,{name:"fade"},{default:r(()=>[e.show_recipe?(o(),a("div",Y,[s(y,{land:e._get(e.recipe,["cautionary ingredients"],{})},null,8,["land"]),Z,s(w,{EN:e._get(e.recipe,["essential nutrients"],{})},null,8,["EN"])])):l("",!0)]),_:1})])):l("",!0),e.showing=="list"?(o(),a("div",ee,[s(x,{style:{minHeight:"400px"}},{default:r(()=>[(o(!0),a(H,null,S(c.treasures,(I,D)=>(o(),a("div",null,[s(v,{treasure:I},null,8,["treasure"]),te,D!==c.treasures.length-1?(o(),f(b,{key:0})):l("",!0),se]))),256)),!Array.isArray(c.IDs)||c.IDs.length===0?(o(),a("div",oe,ie)):l("",!0)]),_:2},1024)])):l("",!0)]),_:1})}const we=j(q,[["render",re],["__scopeId","data-v-46be2d32"]]);export{we as default};


//# sourceMappingURL=data:application/json;base64,[encoded data, 14528 characters]