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


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