import{D as N,L as u,A as m,q as S,v as T,h as A,u as z,d as V,e as $,_ as B,o as n,f as g,w as c,r as s,a as t,n as h,b as o,c as _,x as C,j as p,F as L,g as P,T as F,y as R,z as Y}from"./2.3.1_index.js";import{c as j,e as q}from"./2.3.1_shack.js";import{c as H}from"./2.3.1_scenery2.js";import{s as O}from"./2.3.1_decor13.js";import"./2.3.1_string.js";import"./2.3.1_veranda.js";import"./2.3.1_decor16.js";import"./2.3.1_decor15.js";import"./2.3.1_decor14.js";async function U(){const e=N(u.warehouse().IDs);var i={};return m.warehouse().goal_picked&&(i=m.warehouse().goal.emblem),await S({path:"guests",envelope:{label:"retrieve recipe",freight:{goods:e,goal:i}}})}const G={components:{cautionary_ingredients:j,change_indicator:H,s_button:T,router_link_scenery:A,essential_nutrients:q,s_food_or_supp_summary:O},data(){return{recipe:{},showing:"stats",show_recipe:!1}},methods:{_get:z,async open_list(){console.log("open_list"),this.showing="list"},open_stats(){this.showing="stats"},async open_empty(){await V({label:"cart",field:$(()=>import("./2.3.1_field5.js"),["assets/2.3.1_field5.js","assets/2.3.1_index.js","assets/2.3.1_index.css"])})},async retrieve_recipe(){const{status:e,parsed:i,proceeds:a}=await U();if(e!==200){console.error("The food was not found."),this.found=!1,this.show_recipe=!0;return}this.recipe=a.freight,this.found=!0,this.show_recipe=!0}},async mounted(){this.cart_monitor=u.monitor(({inaugural:e,field:i})=>{const a=u.warehouse();console.log("monitor function",{inaugural:e,field:i,warehouse:a}),this.show_recipe=!1,e||this.retrieve_recipe()}),this.show_recipe=!1,this.retrieve_recipe()},beforeUnmount(){this.cart_monitor.stop()}};const J=G,r=e=>(R("data-v-1703beed"),e=e(),Y(),e),K={style:{display:"flex",flexDirection:"column",height:"100%"}},M=r(()=>t("div",{style:{padding:"1cm 0",textAlign:"center"}},[t("h1",{style:{fontSize:"2em"}},"Presents"),t("div",{style:{height:"0.2cm"}}),t("p",null,"This is the groceries that have been added."),t("div",{style:{height:"0.1cm"}}),t("p",null,"Currently none of these groceries are for sale."),t("div",{style:{height:"0.1cm"}}),t("p",null,"However, some of them might have links to stores that have inventory.")],-1)),Q=r(()=>t("div",{style:{height:"5px"}},null,-1)),W=r(()=>t("div",{style:{height:"5px"}},null,-1)),X={key:0,style:{padding:".5in",textAlign:"center"}},Z=r(()=>t("p",null,"The grocery list is empty.",-1)),ee=[Z],te=r(()=>t("div",{style:{width:"1%"}},null,-1)),se={key:0,style:{position:"absolute",top:0,left:0,height:"100%",boxSizing:"border-box",width:"100%"}},oe=r(()=>t("div",{style:{height:"10px",width:"10px"}},null,-1));function ie(e,i,a,ne,re,ae){const f=s("s_food_or_supp_summary"),y=s("s_line"),v=s("s_button"),w=s("s_panel"),b=s("change_indicator"),x=s("cautionary_ingredients"),k=s("essential_nutrients"),D=s("lounge");return n(),g(D,null,{default:c(({palette:le,terrain:d,cart:l})=>[t("div",K,[M,t("div",{style:h({display:"flex",flexDirection:d.width<900?"column":"row",height:"100%",position:"relative"})},[t("div",{style:h({height:"100%",width:d.width<900?"100%":"40%"})},[o(w,{style:{height:"100%",width:"100%",overflowY:"scroll"}},{default:c(()=>[(n(!0),_(L,null,C(l.treasures,(I,E)=>(n(),_("div",null,[o(f,{treasure:I},null,8,["treasure"]),Q,E!==l.treasures.length-1?(n(),g(y,{key:0})):p("",!0),W]))),256)),!Array.isArray(l.IDs)||l.IDs.length===0?(n(),_("div",X,ee)):p("",!0),o(v,{ref:"button",pressable:!0,clicked:e.open_empty,boundaries:"8px 20px 8px"},{default:c(()=>[P("Remove Everything")]),_:1},8,["clicked"])]),_:2},1024)],4),te,t("div",{"cart-content":"",style:h({position:"relative",top:0,left:0,height:"100%",boxSizing:"border-box",width:d.width<900?"100%":"60%",overflowY:"scroll"})},[o(b,{show:e.show_recipe===!1,style:{position:"absolute",height:"100%",width:"100%",top:0,left:0}},null,8,["show"]),o(F,{name:"fade"},{default:c(()=>[e.show_recipe?(n(),_("div",se,[o(x,{land:e._get(e.recipe,["cautionary ingredients"],{})},null,8,["land"]),oe,o(k,{EN:e._get(e.recipe,["essential nutrients"],{})},null,8,["EN"])])):p("",!0)]),_:1})],4)],4)])]),_:1})}const ye=B(J,[["render",ie],["__scopeId","data-v-1703beed"]]);export{ye as default};


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