import{d as $,X as w,ay as y,o as d,f as i,u as s,l as t,p as a,A as m,N as g,q as F,n as _,az as M,aA as N,z as T,M as V,_ as h}from"./index-ongssuUn.js";const S={class:"food-content"},z={key:0,class:"main-view"},A={class:"food-title"},B={key:0,class:"food-result"},D={class:"result-text"},E=["disabled"],K={key:1,class:"empty-tip"},R={key:1,class:"custom-menu-view"},q={class:"custom-header"},I={class:"custom-input-container"},L=["placeholder"],U={class:"custom-actions"},X=$({name:"NewFoodContent",__name:"content",setup(j){const p=w(),{isRolling:l,selectedFood:u,showCustomMenu:b,foodArray:f,rollFood:k,stopRolling:C,toggleCustomMenu:c,resetToDefault:v,saveFoodList:r}=y();return(e,o)=>(d(),i("div",S,[s(b)?(d(),i("div",R,[t("div",q,[t("h3",null,a(e.$t("所有食物都在这里管理")),1),t("button",{class:"back-button",onClick:o[2]||(o[2]=(...n)=>s(c)&&s(c)(...n))},a(e.$t("返回")),1)]),t("div",I,[_(t("textarea",{"onUpdate:modelValue":o[3]||(o[3]=n=>s(p).newFood.foodText=n),placeholder:e.$t("输入食物名称，用空格分隔"),rows:"8",onKeyup:o[4]||(o[4]=N(T((...n)=>s(r)&&s(r)(...n),["ctrl"]),["enter"]))},null,40,L),[[M,s(p).newFood.foodText]])]),t("div",U,[t("button",{onClick:o[5]||(o[5]=(...n)=>s(v)&&s(v)(...n))},a(e.$t("重置")),1),t("button",{onClick:o[6]||(o[6]=(...n)=>s(r)&&s(r)(...n))},a(e.$t("确定")),1)])])):(d(),i("div",z,[t("div",A,[o[7]||(o[7]=t("span",{class:"food-icon"},"🍔",-1)),t("h2",null,a(e.$t("今天吃什么")),1)]),s(u)?(d(),i("div",B,[t("p",D,a(s(u)),1)])):m("",!0),t("button",{class:g(["start-button",{"stop-button":s(l)}]),onClick:o[0]||(o[0]=n=>s(l)?s(C)():s(k)()),disabled:s(f).length===0&&!s(l)},a(s(l)?e.$t("停止"):e.$t("开始")),11,E),t("button",{class:"custom-menu-button",onClick:o[1]||(o[1]=(...n)=>s(c)&&s(c)(...n))},[o[8]||(o[8]=t("span",{class:"menu-icon"},"🍴",-1)),F(a(e.$t("自定义菜单")),1)]),s(f).length===0?(d(),i("p",K,a(e.$t("请先添加一些食物到自定义菜单中")),1)):m("",!0)])),o[9]||(o[9]=V('<div class="decorations" data-v-51f9945e><span class="decoration-icon" data-v-51f9945e>🍗</span><span class="decoration-icon" data-v-51f9945e>🥤</span><span class="decoration-icon" data-v-51f9945e>🍕</span><span class="decoration-icon" data-v-51f9945e>🌮</span><span class="decoration-icon" data-v-51f9945e>🍔</span><span class="decoration-icon" data-v-51f9945e>🍟</span><span class="decoration-icon" data-v-51f9945e>🥪</span><span class="decoration-icon" data-v-51f9945e>🍣</span><span class="decoration-icon" data-v-51f9945e>🥗</span><span class="decoration-icon" data-v-51f9945e>🍜</span></div>',1))]))}}),H=h(X,[["__scopeId","data-v-51f9945e"]]);export{H as default};
