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