1import{d as fe,a as ye,r as u,aW as Ce,j as d,o as s,i as e,k as f,t as o,m as re,F as Y,n as ae,p as P,M as j,l as _,B as N,a2 as z,at as ne,aL as $e,O as ve,bh as Me,u as _e,aB as je,e as me,f as ce,al as Ae,q as Ie,g as Be,N as Se,c as Pe,bb as Ne}from"./index.js";import{_ as Ue}from"./Modify.vue_vue_type_script_setup_true_lang.js";import{useMenuStore as Re}from"./menu.js";import"./back-short.js";const De={class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl overflow-hidden"},ze={class:"flex flex-wrap items-center justify-between gap-3 px-4 sm:px-5 py-4 border-b dark:border-gray-700"},Fe={class:"flex items-center gap-3 min-w-0"},Ee={class:"min-w-0"},Le={class:"font-semibold dark:text-gray-100 truncate"},Te={class:"text-[12px] text-gray-500 dark:text-gray-400"},Ve={class:"flex items-center gap-2"},Oe={class:"grid grid-cols-1 sm:grid-cols-[220px,1fr]"},Ge={class:"border-b sm:border-b-0 sm:border-r dark:border-gray-700 p-3 flex flex-col gap-2"},Ke={class:"flex sm:flex-col gap-1.5 overflow-x-auto sm:overflow-visible -mx-1 px-1 sm:mx-0 sm:px-0"},We=["onClick"],Ye={class:"min-w-0"},Je={class:"block text-[13.5px] font-semibold dark:text-gray-100 truncate"},qe={class:"block text-[11.5px] text-gray-400 dark:text-gray-500"},He=["onClick"],Xe={class:"flex flex-col min-w-0"},Qe={class:"flex items-center justify-between gap-3 px-4 sm:px-5 pt-4 pb-3"},Ze={class:"min-w-0"},et={class:"text-base font-bold dark:text-gray-100 truncate"},tt={key:0,class:"text-[12.5px] text-gray-400 dark:text-gray-500 mt-0.5 truncate"},rt={class:"px-3 sm:px-4 pb-4"},at={class:"flex-1 min-w-0"},nt={class:"flex items-center gap-2"},lt={key:0,class:"text-[10.5px] font-semibold text-amber-700 dark:text-amber-400 bg-amber-100 dark:bg-amber-400/15 rounded-full px-2 py-0.5 flex-shrink-0"},st={class:"text-[12px] text-gray-400 dark:text-gray-500 mt-0.5 truncate"},ot={class:"w-[112px] sm:w-[132px] flex-shrink-0 text-right"},dt={key:0,class:"inline-flex items-center gap-1 border-[1.5px] border-dinesurf-green-500 rounded-lg px-1.5 py-1 bg-white dark:bg-gray-900"},it={class:"text-gray-400 text-[13px]"},ut=["onKeydown"],gt=["onClick"],xt=["onClick"],pt=["onClick"],bt=["onClick"],vt={class:"relative flex-shrink-0"},mt=["onClick"],ct={key:0,class:"absolute right-0 top-8 z-20 w-44 bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-xl shadow-xl p-1.5"},ft=["onClick"],yt=["onClick"],kt=["onClick"],wt={key:0,class:"text-center py-12 text-gray-400 dark:text-gray-500"},ht={class:"flex items-center justify-between mb-4"},Ct={class:"text-base font-bold dark:text-gray-100"},$t={class:"flex flex-col gap-4"},Mt={class:"flex items-center border dark:border-gray-600 rounded-lg px-3 bg-white dark:bg-gray-900 focus-within:border-dinesurf-green-500"},_t={class:"text-gray-400 text-sm"},jt={class:"flex items-center justify-between bg-gray-50 dark:bg-gray-900/40 border dark:border-gray-700 rounded-xl px-4 py-3"},At={key:0},It=["value"],Bt={class:"flex gap-2.5 justify-end mt-5"},St={class:"text-[16px] font-bold dark:text-gray-100 mb-4"},Pt={class:"flex gap-2.5 justify-end mt-5"},Nt=fe({__name:"MenuReview",props:{categories:{},menuName:{}},emits:["back","submit"],setup(le,{emit:se}){const J=le,L=se,q=ye(),R=re(()=>Me(q.defaultCurrency)||q.defaultCurrency);function T(a){const r=String(a??"").trim();return r==="-"||r.toLowerCase()==="no description available"?"":r}let H=0;const V=()=>`r${Date.now()}_${H++}`,b=u((J.categories||[]).map(a=>({name:(a==null?void 0:a.name)&&String(a.name).trim()||"Food Menu",description:T(a==null?void 0:a.description),items:((a==null?void 0:a.items)||[]).map(r=>({id:V(),name:(r==null?void 0:r.name)&&String(r.name).trim()||"Unnamed item",description:T(r==null?void 0:r.description),price:r!=null&&r.price?Number(r.price):null,availability:"on"}))}))),i=u(0),x=re(()=>b.value[i.value]??{name:"",description:"",items:[]}),c=re(()=>b.value.reduce((a,r)=>a+r.items.length,0)),A=a=>R.value+Number(a??0).toLocaleString("en-NG"),h=a=>a.price!=null&&a.price>0,I=u(null),B=u("");function k(a){w.value=null,I.value=a.id,B.value=a.price!=null?String(a.price):""}function U(a){const r=B.value.trim().replace(/[^0-9.]/g,"");a.price=r===""?null:Number(r)||null,I.value=null}const w=u(null);function F(a){a.availability=a.availability==="on"?"off":"on"}function O(a){x.value.items=x.value.items.filter(r=>r.id!==a.id),w.value=null}const C=u(!1),y=u("add"),$=u(null),v=u({name:"",price:"",description:"",availability:"on",catIndex:0});function X(){y.value="add",$.value=null,v.value={name:"",price:"",description:"",availability:"on",catIndex:i.value},C.value=!0}function G(a,r=!1){w.value=null,y.value="edit",$.value=a.id,v.value={name:a.name,price:a.price!=null?String(a.price):"",description:a.description,availability:a.availability,catIndex:i.value},C.value=!0}function oe(){const a=v.value;if(!a.name.trim())return;const r=a.price.trim().replace(/[^0-9.]/g,""),m=r===""?null:Number(r)||null;y.value==="add"?x.value.items.push({id:V(),name:a.name.trim(),description:a.description.trim(),price:m,availability:a.availability}):(b.value=b.value.map(n=>({...n,items:n.items.filter(p=>p.id!==$.value)})),b.value[a.catIndex].items.push({id:$.value,name:a.name.trim(),description:a.description.trim(),price:m,availability:a.availability}),i.value=a.catIndex),C.value=!1}const S=u(!1),E=u("add"),Q=u(0),D=u(""),K=u();
1function de(){E.value="add",D.value="",S.value=!0,ve(()=>{var a;return(a=K.value)==null?void 0:a.focus()})}function ie(a){E.value="rename",Q.value=a,D.value=b.value[a].name,S.value=!0,ve(()=>{var r;return(r=K.value)==null?void 0:r.focus()})}function Z(){const a=D.value.trim();a&&(E.value==="add"?(b.value.push({name:a,description:"",items:[]}),i.value=b.value.length-1):b.value[Q.value].name=a,S.value=!1)}function ee(){const a=b.value.map(r=>({name:r.name.trim()||"Food Menu",description:r.description.trim()||"-",items:r.items.filter(m=>m.name.trim()).map(m=>({id:null,name:m.name.trim(),description:m.description.trim()||"No description available",price:m.price!=null?Number(m.price):0,status:m.availability}))})).filter(r=>r.items.length>0);L("submit",a)}return(a,r)=>{const m=Ce("click-outside");return s(),d("div",De,[e("div",ze,[e("div",Fe,[r[16]||(r[16]=e("span",{class:"w-9 h-9 rounded-lg bg-dinesurf-green-500/15 text-dinesurf-green-700 dark:text-dinesurf-green-400 inline-flex items-center justify-center flex-shrink-0"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor","stroke-width":"2.6",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])],-1)),e("div",Ee,[e("div",Le,o(le.menuName),1),e("div",Te," Extracted by AI · "+o(c.value)+" "+o(c.value===1?"item":"items")+" in "+o(b.value.length)+" "+o(b.value.length===1?"category":"categories")+" · review before importing ",1)])]),e("div",Ve,[e("button",{onClick:r[0]||(r[0]=n=>a.$emit("back")),class:"inline-flex items-center gap-1.5 bg-white dark:bg-gray-800 border dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700/60 rounded-lg px-3 py-2 text-[13px] font-medium text-gray-600 dark:text-gray-300"},[...r[17]||(r[17]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3"})],-1),e("span",{class:"hidden sm:inline"},"Return to upload",-1)])]),e("button",{onClick:ee,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-4 py-2 text-[13px] font-semibold"}," Import to menu ")])]),e("div",Oe,[e("div",Ge,[r[20]||(r[20]=e("div",{class:"text-[11px] uppercase tracking-wide font-semibold text-gray-400 dark:text-gray-500 px-1.5 hidden sm:block"}," Categories ",-1)),e("div",Ke,[(s(!0),d(Y,null,ae(b.value,(n,p)=>(s(),d("button",{key:p,onClick:ue=>i.value=p,class:P(["group flex items-center justify-between gap-2 rounded-lg px-3 py-2.5 flex-shrink-0 text-left min-w-[140px] sm:min-w-0 sm:w-full border",p===i.value?"bg-dinesurf-green-500/10 border-dinesurf-green-500/30":"bg-transparent border-transparent hover:bg-gray-50 dark:hover:bg-gray-700/40"])},[e("span",Ye,[e("span",Je,o(n.name),1),e("span",qe,o(n.items.length)+" "+o(n.items.length===1?"item":"items"),1)]),e("span",{onClick:j(ue=>ie(p),["stop"]),class:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 flex-shrink-0 p-0.5"},[...r[18]||(r[18]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931z"})],-1)])],8,He)],10,We))),128))]),e("button",{onClick:de,class:"mt-1 flex items-center gap-2 rounded-lg border border-dashed dark:border-gray-700 px-3 py-2.5 text-[12.5px] font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700/40"},[...r[19]||(r[19]=[e("span",{class:"text-dinesurf-green-600 text-base leading-none"},"+",-1),_(" Add category ",-1)])])]),e("div",Xe,[e("div",Qe,[e("div",Ze,[e("div",et,o(x.value.name),1),x.value.description?(s(),d("div",tt,o(x.value.description),1)):f("",!0)]),e("button",{onClick:X,class:"inline-flex items-center gap-1.5 bg-dinesurf-green-500/15 text-dinesurf-green-700 dark:text-dinesurf-green-400 border border-dinesurf-green-500/30 rounded-lg px-3 py-2 text-[12.5px] font-semibold flex-shrink-0"},[...r[21]||(r[21]=[e("span",{class:"text-base leading-none"},"+",-1),_(" Add item ",-1)])])]),e("div",rt,[(s(!0),d(Y,null,ae(x.value.items,n=>(s(),d("div",{key:n.id,class:P(["flex items-center gap-3 sm:gap-4 roun
1ded-xl border dark:border-gray-700/70 px-3 py-3 mb-2",n.availability==="off"?"bg-gray-50/60 dark:bg-gray-900/30":"bg-white dark:bg-gray-800"])},[e("div",at,[e("div",nt,[e("span",{class:P(["text-[14px] font-semibold truncate",n.availability==="off"?"text-gray-400 dark:text-gray-500":"dark:text-gray-100"])},o(n.name),3),n.availability==="off"?(s(),d("span",lt," Off ")):f("",!0)]),e("div",st,o(n.description||"No description"),1)]),e("div",ot,[I.value===n.id?(s(),d("div",dt,[e("span",it,o(R.value),1),N(e("input",{"onUpdate:modelValue":r[1]||(r[1]=p=>B.value=p),onKeydown:[ne(p=>U(n),["enter"]),r[2]||(r[2]=ne(p=>I.value=null,["esc"]))],inputmode:"decimal",placeholder:"0",class:"w-14 bg-transparent border-none outline-none text-[13px] font-semibold text-right dark:text-gray-100"},null,40,ut),[[z,B.value]]),e("button",{onClick:p=>U(n),class:"bg-dinesurf-green-600 rounded-md w-5 h-5 text-white inline-flex items-center justify-center"},[...r[22]||(r[22]=[e("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor","stroke-width":"3",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})],-1)])],8,gt)])):(s(),d(Y,{key:1},[h(n)?(s(),d("button",{key:0,onClick:p=>k(n),class:"text-[14px] font-semibold dark:text-gray-100 px-1.5 py-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700/60"},o(A(n.price)),9,xt)):(s(),d("button",{key:1,onClick:p=>k(n),class:"inline-flex items-center gap-1 bg-amber-50 dark:bg-amber-400/10 border border-amber-200 dark:border-amber-400/30 rounded-lg px-2.5 py-1.5 text-[12px] font-semibold text-amber-700 dark:text-amber-400"}," + Add price ",8,pt))],64))]),e("button",{onClick:p=>F(n),class:P(["relative w-9 h-[22px] rounded-full flex-shrink-0 transition-colors",n.availability==="on"?"bg-dinesurf-green-600":"bg-gray-300 dark:bg-gray-600"]),title:"Availability"},[e("span",{class:P(["absolute top-0.5 w-[18px] h-[18px] rounded-full bg-white shadow transition-all",n.availability==="on"?"left-[18px]":"left-0.5"])},null,2)],10,bt),e("div",vt,[e("button",{onClick:j(p=>w.value=w.value===n.id?null:n.id,["stop"]),class:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 w-7 h-7 rounded-md inline-flex items-center justify-center"},[...r[23]||(r[23]=[e("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[e("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})],-1)])],8,mt),w.value===n.id?N((s(),d("div",ct,[e("button",{onClick:p=>G(n),class:"w-full text-left flex items-center gap-2.5 px-3 py-2 text-[13px] dark:text-gray-200 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700/60"}," Edit item ",8,ft),e("button",{onClick:p=>G(n,!0),class:"w-full text-left flex items-center gap-2.5 px-3 py-2 text-[13px] dark:text-gray-200 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700/60"}," Move to⦠",8,yt),e("button",{onClick:p=>O(n),class:"w-full text-left flex items-center gap-2.5 px-3 py-2 text-[13px] text-red-600 dark:text-red-400 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20"}," Remove ",8,kt)])),[[m,()=>w.value=null]]):f("",!0)])],2))),128)),x.value.items.length===0?(s(),d("div",wt,[r[24]||(r[24]=e("div",{class:"text-[13.5px] mb-3.5"}," No items in this category yet. ",-1)),e("button",{onClick:X,class:"bg-dinesurf-green-500/15 text-dinesurf-green-700 dark:text-dinesurf-green-400 border border-dinesurf-green-500/30 rounded-lg px-4 py-2 text-[13px] font-semibold"}," + Add first item ")])):f("",!0)])])]),C.value?(s(),d("div",{key:0,onClick:r[11]||(r[11]=n=>C.value=!1),class:"fixed inset-0 z-[80] bg-black/45 flex items-center justify-center p-4"},[e("div",{onClick:r[10]||(r[10]=j(()=>{},["stop"])),class:"w-[460px] max-w-full max-h-[88vh] overflow-y-auto bg-white dark:bg-gray-800 rounded-2xl p-5 sm:p-6 shadow-2xl"},[e("div",ht,[e("h3",Ct,o(y.value==="add"?"Add item":"Edit item"),1),e("button",{onClick:r[3]||(r[3]=n=>C.value=!1),class:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200"},[...r[25]||(r[25]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),e("div",$t,[e("div",null,[r[26]||(r[26]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},"Item name",-1)),N(e("input",{"onUpdate:modelValue":r[4]||(r[4]=n=>v.value.name=n),placeholder:"e.g. Jollof Rice",class:"w-full border dark:border-gray-600 rounded-lg px-3 py-2.5 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none focus:border-dinesurf-green-500"},null,512),[[z,v.value.name]])]),e("div",null,[r[27]||(r[27]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},[_(" Price "),e("span",{class:"text-gray-400 font-normal"},"â leave blank if unknown")],-1)),e("div",Mt,[e("span",_t,o(R.value),1),N(e("input",{"onUpdate:modelValue":r[5]||(r[5]=n=>v.value.price=n),inputmode:"decimal",placeholder:"0",class:"flex-1 bg-transparent border-none px-2 py-2.5 text-sm dark:text-gray-100 outline-none"},null,512),[[z,v.value.price]])])]),e("div",null,[r[28]||(r[28]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},"Description",-1)),N(e("textarea",{"onUpdate:modelValue":r[6]||(r[6]=n=>v.value.description=n),placeholder:"Short description",class:"w-full border dark:border-gray-600 rounded-lg px-3 py-2.5 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none focus:border-dinesurf-green-500 resize-y min-h-[68px]"},null,512),[[z,v.value.description]])]),e("div",jt,[r[29]||(r[29]=e("div",null,[e("div",{class:"text-[13.5px] font-semibold dark:text-gray-100"}," Available "),e("div",{class:"text-[12px] text-gray-400 dark:text-gray-500"}," Show this item on your menu ")],-1)),e("button",{onClick:r[7]||(r[7]=n=>v.value.availability=v.value.availability==="on"?"off":"on"),class:P(["relative w-9 h-[22px] rounded-full transition-colors",v.value.availability==="on"?"bg-dinesurf-green-600":"bg-gray-300 dark:bg-gray-600"])},[e("span",{class:P(["absolute top-0.5 w-[18px] h-[18px] rounded-full bg-white shadow transition-all",v.value.availability==="on"?"left-[18px]":"left-0.5"])},null,2)],2)]),y.value==="edit"?(s(),d("div",At,[r[30]||(r[30]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},"Category",-1)),N(e("select",{"onUpdate:modelValue":r[8]||(r[8]=n=>v.value.catIndex=n),class:"w-full border dark:border-gray-600 rounded-lg px-3 py-2.5 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none"},[(s(!0),d(Y,null,ae(b.value,(n,p)=>(s(),d("option",{key:p,value:p},o(n.name),9,It))),128))],512),[[$e,v.value.catIndex,void 0,{number:!0}]]),r[31]||(r[31]=e("div",{class:"text-[11.5px] text-gray-400 dark:text-gray-500 mt-1.5"}," Pick a different category to move this item. ",-1))])):f("",!0)]),e("div",Bt,[e("button",{onClick:r[9]||(r[9]=n=>C.value=!1),class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2 text-[13.5px] font-semibold text-gray-600 dark:text-gray-300"}," Cancel "),e("button",{onClick:oe,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2 text-[13.5px] font-semibold"},o(y.value==="add"?"Add item":"Save changes"),1)])])])):f("",!0),S.value?(s(),d("div",{key:1,onClick:r[15]||(r[15]=n=>S.value=!1),class:"fixed inset-0 z-[80] bg-black/45 flex items-center justify-center p-4"},[e("div",{onClick:r[14]||(r[14]=j(()=>{},["stop"])),class:"w-[400px] max-w-full bg-white dark:bg-gray-800 rounded-2xl p-5 sm:p-6 shadow-2xl"},[e("h3",St,o(E.value==="add"?"Add category":"Rename category"),1),r[32]||(r[32]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},"Category name",-1)),N(e("input",{ref_key:"renameInputRef",ref:K,"onUpdate:modelValue":r[12]||(r[12]=n=>D.value=n),onKeydown:ne(Z,["enter"]),class:"w-full border dark:border-gray-600 rounded-lg px-3 py-2.5 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none focus:border-dinesurf-green-500"},null,544),[[z,D.value]]),e("div",Pt,[e("button",{onClick:r[13]||(r[13]=n=>S.value=!1),class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2 text-[13.5px] font-semibold text-gray-600 dark:text-gray-300"}," Cancel "),e("button",{onClick:Z,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2 text-[13.5px] font-semibold"}," Save ")])])])):f("",!0)])}}}),Ut={class:"max-w-3xl mx-auto w-full"},Rt={key:0,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-5 sm:p-7"},Dt={class:"max-w-xl mx-auto flex flex-col gap-5"},zt={key:0,class:"text-xs text-red-600 dark:text-red-400 mt-1.5 flex items-center gap-1.5"},Ft=["accept"],Et={key:0,class:"mt-3 flex flex-col gap-2"},Lt={class:"flex-1 min-w-0"},Tt={class:"text-[13.5px] font-medium dark:text-gray-100 truncate"},Vt={class:"text-xs text-gray-400 dark:text-gray-500"},Ot=["onClick"],Gt={key:1,class:"text-xs text-red-600 dark:text-red-400 mt-2 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg px-3 py-2 flex items-start gap-2"},Kt=["disabled"],Wt={key:0,class:"w-4 h-4 border-2 border-white/50 border-t-white rounded-full animate-spin"},Yt={key:1,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-7 sm:p-10"},Jt={class:"max-w-md mx-auto"},qt={class:"flex items-center gap-3 mb-5"},Ht={class:"min-w-0"},Xt={class:"text-sm font-semibold dark:text-gray-100"},Qt={class:"flex items-center justify-between text-[13px] mb-2"},Zt={class:"text-gray-500 dark:text-gray-400 tabular-nums"}
1,er={class:"h-2.5 rounded-full bg-gray-100 dark:bg-gray-700 overflow-hidden"},tr={key:2,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-7 sm:p-9"},rr={class:"max-w-md mx-auto flex flex-col items-center"},ar={key:3,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-8 sm:p-11 text-center"},nr={key:4,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-8 sm:p-11 text-center"},lr={key:5,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-8 sm:p-10 text-center"},sr={class:"max-w-md mx-auto"},or={class:"text-[13.5px] text-gray-500 dark:text-gray-400 mt-2 leading-relaxed"},dr={class:"dark:text-gray-200"},ir={class:"flex gap-2.5 justify-center"},ur={key:6,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-12 sm:p-16 text-center"},gr={class:"flex flex-col items-center"},xr={class:"mt-1.5 text-[13px] text-gray-400 dark:text-gray-500"},pr={key:7,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-2xl p-12 sm:p-14 text-center"},br={class:"max-w-sm mx-auto flex flex-col items-center"},vr={class:"text-[13.5px] text-gray-500 dark:text-gray-400 mt-2 leading-relaxed"},mr={class:"dark:text-gray-200"},cr={class:"text-[17px] font-bold dark:text-gray-100"},fr={class:"flex flex-col gap-2.5 mt-5"},yr={class:"flex-1"},kr={class:"block text-[12px] text-gray-400 dark:text-gray-500 mt-0.5"},wr={class:"flex gap-2.5 justify-end mt-5"},W=20,hr=fe({__name:"Upload",setup(le){const se=Ae(),J=Re(),L=ye(),q=_e(),{toast:R}=Pe(),T=W*1024*1024,H=["image/png","image/jpeg","application/pdf"],V=["Reading your menuâ¦","Finding the categoriesâ¦","Pulling out items and pricesâ¦","Organising everythingâ¦","Almost thereâ¦"],b=l=>(l/1024/1024).toFixed(1),i=u("idle"),x=u(""),c=u([]),A=u(""),h=u(""),I=u(!1),B=u(!1),k=u({loaded:0,total:0,percent:0}),U=u(0);let w=null;const F=u([]),O=u(0),C=u(0),y=u(!1),$=u(!1),v=u(""),X=re(()=>{var l;return c.value.length>1?`${c.value.length} files`:((l=c.value[0])==null?void 0:l.name)??"Your menu"}),G=u();function oe(){var l;(l=G.value)==null||l.click()}function S(l){if(l){h.value="";for(const t of Array.from(l)){if(!H.includes(t.type)){h.value=`${t.name} isn't a supported type â use PNG, JPEG or PDF.`;continue}if(t.size>T){h.value=`${t.name} is ${b(t.size)} MB â the maximum is ${W} MB.`;continue}c.value.push(t)}}}function E(l){const t=l.target;S(t.files),t.value=""}function Q(l){var t;I.value=!1,S((t=l.dataTransfer)==null?void 0:t.files)}function D(l){c.value.splice(l,1)}function K(){if(A.value="",h.value="",!x.value.trim()){A.value="Please enter a menu name";return}if(!c.value.length){h.value="Please add at least one menu file";return}const l=c.value.find(t=>t.size>T);if(l){h.value=`${l.name} is ${b(l.size)} MB â the maximum is ${W} MB.`;return}de()}async function de(){var l;B.value=!0;try{const t=await q.menu.checkMenu({vendor_id:L.vendor.id,name:x.value});(l=t==null?void 0:t.data)!=null&&l.exists?y.value=!0:a()}catch(t){R({title:"Error",message:(t==null?void 0:t.message)||"Couldn't check the menu name. Please try again.",type:"error"})}finally{B.value=!1}}function ie(){y.value=!1,a()}function Z(){y.value=!1,v.value=x.value,$.value=!0}function ee(){const l=v.value.trim();l&&(x.value=l,$.value=!1,a())}async function a(){k.value={loaded:0,total:0,percent:0},i.value="uploading";try{const l=await J.getAutoMenu(L.vendor.id,x.value,c.value,t=>{const g=t.total??0,M=t.loaded??0;k.value={loaded:M,total:g,percent:g?Math.round(M/g*100):0},k.value.percent>=100&&i.value==="uploading"&&r()});n(l)}catch(l){p(l)}}function r(){i.value="processing",U.value=0,m(),w=window.setInterval(()=>{U.value=(U.value+1)%V.length},2400)}function m(){w&&window.clearInterval(w),w=null}function n(l){m();const t=Array.isArray(l)?l:[],g=t.reduce((M,te)=>{var be;return M+(((be=te==null?void 0:te.items)==null?void 0:be.length)||0)},0);if(g===0){i.value="aiFailed";return}if(F.value=t,g<3){O.value=g,i.value="lowResult";return}i.value="review"}function p(l){m();const t=(l==null?void 0:l.message)||"";if(/too large|exceed|413|failed to upload|post.*(size|large)|payload/i.test(t)){R({title:"File too large",message:`Your upload is too large (max ${W} MB). Please use smaller files.`,type:"error"}),i.value="idle";return}i.value=k.value.percent<100?"uploadFailed":"aiFailed"}async function ue(l){C.value=l.reduce((t,g)=>{var M;return t+(((M=g==null?void 0:g.items)==null?void 0:M.length)||0)},0),i.value="importing";try{await J.uploadMenu(L.vendor.id,x.value,l),i.value="success"}catch(t){R({title:"Error",message:(t==null?void 0:t.message)||"We couldn't save your menu. Please try again.",type:"error"}),i.value="review"}}function xe(){m(),i.value="idle"}function ge(){pe(),i.value="idle"}function ke(){F.value=[{name:x.value||"Menu",description:"",items:[]}],i.value="review"}function we(){pe(),i.value="idle"}function he(){se.push({name:"dashboard.menus.index"})}function pe(){x.value="",c.value=[],A.value="",h.value="",F.value=[],k.value={loaded:0,total:0,percent:0}}return je(m),(l,t)=>(s(),me(Ue,{to:{name:"dashboard.menus.index"},title:"Upload menu",description:"Add a photo or PDF of your menu and we'll turn it into an editable digital menu.",label:"menu"},{default:ce(()=>[e("div",Ut,[i.value==="idle"?(s(),d("div",Rt,[e("div",Dt,[e("div",null,[t[14]||(t[14]=e("label",{class:"block text-[13.5px] font-semibold mb-2 dark:text-gray-200"},[_(" Menu name "),e("span",{class:"text-red-500"},"*")],-1)),N(e("input",{"onUpdate:modelValue":t[0]||(t[0]=g=>x.value=g),onInput:t[1]||(t[1]=g=>A.value=""),placeholder:"e.g. Dinner menu",class:P(["w-full border rounded-xl px-3.5 py-3 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none focus:border-dinesurf-green-500",A.value?"border-red-400":"dark:border-gray-600 border-gray-300"])},null,34),[[z,x.value]]),A.value?(s(),d("p",zt,[t[13]||(t[13]=e("span",null,"â ",-1)),_(o(A.value),1)])):f("",!0)]),e("div",null,[t[20]||(t[20]=e("label",{class:"block text-[13.5px] font-semibold mb-2 dark:text-gray-200"},"Menu file(s)",-1)),e("div",{onClick:oe,onDrop:j(Q,["prevent"]),onDragover:t[2]||(t[2]=j(g=>I.value=!0,["prevent"])),onDragleave:t[3]||(t[3]=j(g=>I.value=!1,["prevent"])),class:P(["flex flex-col items-center justify-center text-center px-5 py-8 rounded-2xl border-2 border-dashed cursor-pointer transition-colors",I.value?"border-dinesurf-green-500 bg-dinesurf-green-500/10":"border-gray-300 dark:border-gray-600 bg-gray-50/60 dark:bg-gray-900/30 hover:bg-gray-50 dark:hover:bg-gray-900/50"])},[t[15]||(t[15]=e("span",{class:"w-12 h-12 rounded-xl bg-dinesurf-green-500/15 inline-flex items-center justify-center mb-3"},[e("svg",{class:"w-5 h-5 text-dinesurf-green-700 dark:text-dinesurf-green-400",fill:"none",stroke:"currentColor","stroke-width":"1.9",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V4.5m0 0L7.5 9M12 4.5L16.5 9"}),e("path",{"stroke-linecap":"round",d:"M4.5 16.5V18a1.5 1.5 0 001.5 1.5h12a1.5 1.5 0 001.5-1.5v-1.5"}
1)])],-1)),t[16]||(t[16]=e("div",{class:"text-sm text-gray-600 dark:text-gray-300"},[e("span",{class:"font-semibold text-dinesurf-green-700 dark:text-dinesurf-green-400"},"Click to upload"),_(" or drag and drop ")],-1)),e("div",{class:"text-xs text-gray-400 dark:text-gray-500 mt-1.5"}," PNG, JPEG or PDF · up to "+o(W)+" MB · add several for a multi-page menu ")],34),e("input",{ref_key:"fileInputRef",ref:G,type:"file",multiple:"",accept:H.join(","),class:"hidden",onChange:E},null,40,Ft),c.value.length?(s(),d("div",Et,[(s(!0),d(Y,null,ae(c.value,(g,M)=>(s(),d("div",{key:M,class:"flex items-center gap-3 border dark:border-gray-700 rounded-xl px-3 py-2.5"},[t[18]||(t[18]=e("span",{class:"w-9 h-9 rounded-lg bg-dinesurf-green-500/15 text-dinesurf-green-700 dark:text-dinesurf-green-400 inline-flex items-center justify-center flex-shrink-0"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 3.5h7L18.5 8v12a.5.5 0 01-.5.5H7a1 1 0 01-1-1V4.5a1 1 0 011-1z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 3.5v5h5"})])],-1)),e("div",Lt,[e("div",Tt,o(g.name),1),e("div",Vt,o(b(g.size))+" MB ",1)]),e("button",{onClick:j(te=>D(M),["stop"]),class:"w-8 h-8 rounded-lg bg-gray-50 dark:bg-gray-700/60 border dark:border-gray-700 text-gray-500 dark:text-gray-300 inline-flex items-center justify-center flex-shrink-0"},[...t[17]||(t[17]=[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Ot)]))),128))])):f("",!0),h.value?(s(),d("p",Gt,[t[19]||(t[19]=e("span",null,"â ",-1)),e("span",null,o(h.value),1)])):f("",!0)]),e("button",{onClick:K,disabled:B.value,class:"w-full rounded-xl py-3 text-sm font-bold text-white bg-dinesurf-green-600 hover:bg-dinesurf-green-700 disabled:opacity-60 flex items-center justify-center gap-2"},[B.value?(s(),d("span",Wt)):f("",!0),t[21]||(t[21]=_(" Generate menu ",-1))],8,Kt)])])):i.value==="uploading"?(s(),d("div",Yt,[e("div",Jt,[e("div",qt,[t[23]||(t[23]=e("span",{class:"w-11 h-11 rounded-xl bg-dinesurf-green-500/15 text-dinesurf-green-700 dark:text-dinesurf-green-400 inline-flex items-center justify-center flex-shrink-0"},[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor","stroke-width":"1.7",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 3.5h7L18.5 8v12a.5.5 0 01-.5.5H7a1 1 0 01-1-1V4.5a1 1 0 011-1z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 3.5v5h5"})])],-1)),e("div",Ht,[e("div",Xt,o(X.value),1),t[22]||(t[22]=e("div",{class:"text-xs text-gray-400 dark:text-gray-500"}," Uploading your menu⦠",-1))])]),e("div",Qt,[t[24]||(t[24]=e("span",{class:"font-semibold text-gray-700 dark:text-gray-200"},"Uploadingâ¦",-1)),e("span",Zt,o(b(k.value.loaded))+" / "+o(b(k.value.total))+" MB · "+o(k.value.percent)+"% ",1)]),e("div",er,[e("div",{class:"h-full rounded-full bg-dinesurf-green-600 transition-[width] duration-200",style:Ie({width:k.value.percent+"%"})},null,4)]),t[25]||(t[25]=e("p",{class:"text-xs text-gray-400 dark:text-gray-500 mt-3"}," Keep this tab open. Large files can take a moment on slower connections. ",-1)),e("button",{onClick:xe,class:"mt-5 bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2 text-[13px] font-medium text-gray-500 dark:text-gray-300"}," Cancel ")])])):i.value==="processing"?(s(),d("div",tr,[e("div",rr,[t[26]||(t[26]=e("div",{class:"ds-scanframe relative w-[180px] h-[230px] rounded-xl overflow-hidden bg-white dark:bg-gray-900 border dark:border-gray-700 shadow-lg"},[e("div",{class:"absolute inset-0 p-5 flex flex-col gap-2.5"},[e("div",{class:"h-2.5 w-[58%] rounded bg-gray-200 dark:bg-gray-700"}),e("div",{class:"h-1.5 w-[88%] rounded bg-gray-100 dark:bg-gray-800"}),e("div",{class:"h-1.5 w-[74%] rounded bg-gray-100 dark:bg-gray-800 mb-1.5"}),e("div",{class:"h-2 w-[44%] rounded bg-gray-200 dark:bg-gray-700"}),e("div",{class:"h-1.5 w-[82%] rounded bg-gray-100 dark:bg-gray-800"}),e("div",{class:"h-1.5 w-[68%] rounded bg-gray-100 dark:bg-gray-800 mb
1-1.5"}),e("div",{class:"h-2 w-[50%] rounded bg-gray-200 dark:bg-gray-700"}),e("div",{class:"h-1.5 w-[90%] rounded bg-gray-100 dark:bg-gray-800"}),e("div",{class:"h-1.5 w-[60%] rounded bg-gray-100 dark:bg-gray-800"})]),e("div",{class:"ds-scanbar"})],-1)),Be(Se,{name:"proc",mode:"out-in"},{default:ce(()=>[(s(),d("div",{key:U.value,class:"mt-6 text-[17px] font-semibold dark:text-gray-100 text-center"},o(V[U.value]),1))]),_:1}),t[27]||(t[27]=e("div",{class:"mt-1.5 text-[13px] text-gray-400 dark:text-gray-500 text-center"}," Reading your menu with AI. This usually takes under a minute. ",-1)),t[28]||(t[28]=e("div",{class:"relative w-56 h-1 rounded-full bg-gray-100 dark:bg-gray-700 overflow-hidden mt-5"},[e("div",{class:"ds-indeterminate absolute top-0 h-full w-2/5 rounded-full bg-dinesurf-green-600"})],-1)),e("button",{onClick:xe,class:"mt-6 text-gray-400 dark:text-gray-500 text-[12.5px] underline underline-offset-4"}," Cancel ")])])):i.value==="uploadFailed"?(s(),d("div",ar,[e("div",{class:"max-w-md mx-auto"},[t[29]||(t[29]=e("div",{class:"w-15 h-15 w-[60px] h-[60px] rounded-2xl bg-red-50 dark:bg-red-900/20 inline-flex items-center justify-center mb-4 text-2xl"}," ð¡ ",-1)),t[30]||(t[30]=e("h3",{class:"text-lg font-bold dark:text-gray-100"}," Upload interrupted ",-1)),t[31]||(t[31]=e("p",{class:"text-[13.5px] text-gray-500 dark:text-gray-400 mt-2 leading-relaxed"}," Your connection dropped while we were uploading your menu. Nothing was lost â you can pick up where you left off. ",-1)),e("div",{class:"flex gap-2.5 justify-center mt-5"},[e("button",{onClick:ge,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2.5 text-[13.5px] font-semibold text-gray-700 dark:text-gray-200"}," Start over "),e("button",{onClick:a,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2.5 text-[13.5px] font-semibold"}," Retry upload ")])])])):i.value==="aiFailed"?(s(),d("div",nr,[e("div",{class:"max-w-md mx-auto"},[t[32]||(t[32]=e("div",{class:"w-[60px] h-[60px] rounded-2xl bg-amber-50 dark:bg-amber-400/10 inline-flex items-center justify-center mb-4 text-2xl"}," ð ",-1)),t[33]||(t[33]=e("h3",{class:"text-lg font-bold dark:text-gray-100"}," We couldn't read this menu ",-1)),t[34]||(t[34]=e("p",{class:"text-[13.5px] text-gray-500 dark:text-gray-400 mt-2 leading-relaxed"}," The AI couldn't make out the text in your file. This usually happens with blurry photos, glare, or handwriting. Try a sharper, well-lit photo taken straight-on. ",-1)),e("div",{class:"flex gap-2.5 justify-center mt-5"},[e("button",{onClick:ke,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2.5 text-[13.5px] font-semibold text-gray-700 dark:text-gray-200"}," Enter manually "),e("button",{onClick:ge,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2.5 text-[13.5px] font-semibold"}," Try a clearer photo ")])])])):i.value==="lowResult"?(s(),d("div",lr,[e("div",sr,[t[37]||(t[37]=e("div",{class:"w-[60px] h-[60px] rounded-2xl bg-dinesurf-green-500/15 inline-flex items-center justify-center mb-4 text-2xl"}," ð ",-1)),t[38]||(t[38]=e("h3",{class:"text-lg font-bold dark:text-gray-100"}," We only found a little here ",-1)),e("p",or,[t[35]||(t[35]=_(" We could only pull ",-1)),e("b",dr,o(O.value)+" "+o(O.value===1?"item":"items"),1),t[36]||(t[36]=_(" from this file, which is fewer than a full menu usually has. The photo may be partly cut off or hard to read. ",-1))]),t[39]||(t[39]=e("div",{class:"bg-gray-50 dark:bg-gray-900/40 border dark:border-gray-700 rounded-xl px-4 py-3.5 text-left mt-4 mb-5"},[e("div",{class:"text-[12.5px] font-semibold text-gray-700 dark:text-gray-200 mb-2"}," For a better result "),e("ul",{class:"text-[12.5px] text-gray-500 dark:text-gray-400 leading-7 list-disc pl-4"},[e("li",null,"Make sure the whole menu is in frame"),e("li",null,"Avoid glare and shadows"),e("li",null,"Take it straight-on, not at an angle")])],-1)),e("div",ir,[e("button",{onClick:t[4]||(t[4]=g=>i.value="review"),class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2.5 text-[13.5px] font-semibold text-gray-700 dark:text-gray-200"}," Use what we found "),e("button",{onClick:ge,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2.5 text-[13.5px] font-semibold"}," Re-upload a clearer photo ")])])])):i.value==="importing"?(s(),d("div",ur,[e("div",gr,[t[40]||(t[40]=e("span",{class:"w-10 h-10 border-[3px] border-gray-200 dark:border-gray-700 border-t-dinesurf-green-600 rounded-full animate-spin"},null,-1)),t[41]||(t[41]=e("div",{class:"mt-5 text-base font-semibold dark:text-gray-100"}," Saving your menu⦠",-1)),e("div",xr," Adding your items to "+o(x.value)+". ",1)])])):i.value==="success"?(s(),d("div",pr,[e("div",br,[t[42]||(t[42]=e("span",{class:"w-16 h-16 rounded-full bg-dinesurf-green-500/15 inline-flex items-center justify-center"},[e("svg",{class:"w-8 h-8 text-dinesurf-green-700 dark:text-dinesurf-green-400",fill:"none",stroke:"currentColor","stroke-width":"2.6",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"})])],-1)),t[43]||(t[43]=e("h3",{class:"text-xl font-bold dark:text-gray-100 mt-5"}," Menu imported ",-1)),e("p",vr,[e("b",mr,o(x.value),1),_(" is live with "+o(C.value)+" "+o(C.value===1?"item":"items")+". ",1)]),e("div",{class:"flex gap-2.5 mt-6"},[e("button",{onClick:we,class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2.5 text-[13.5px] font-semibold text-gray-700 dark:text-gray-200"}," Upload another "),e("button",{onClick:he,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2.5 text-[13.5px] font-semibold"}," View menu ")])])])):i.value==="review"?(s(),me(Nt,{key:8,categories:F.value,"menu-name":x.value,onBack:t[5]||(t[5]=g=>i.value="idle"),onSubmit:ue},null,8,["categories","menu-name"])):f("",!0)]),y.value?(s(),d("div",{key:0,onClick:t[8]||(t[8]=g=>y.value=!1),class:"fixed inset-0 z-[80] bg-black/45 flex items-center justify-center p-4"},[e("div",{onClick:t[7]||(t[7]=j(()=>{},["stop"])),class:"w-[440px] max-w-full bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-2xl"},[t[47]||(t[47]=e("div",{class:"w-12 h-12 rounded-xl bg-amber-50 dark:bg-amber-400/10 inline-flex items-center justify-center text-xl mb-4"}," ð ",-1)),e("h3",cr,' You already have a "'+o(x.value)+'" menu ',1),t[48]||(t[48]=e("p",{class:"text-[13.5px] text-gray-500 dark:text-gray-400 mt-2 leading-relaxed"}," Add these extracted items to your existing menu, or create a separate one with a different name? ",-1)),e("div",fr,[e("button",{onClick:ie,class:"flex items-center gap-3 text-left bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-xl px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700/50"}
1,[t[45]||(t[45]=e("span",{class:"text-lg"},"â",-1)),e("span",yr,[t[44]||(t[44]=e("span",{class:"block text-[13.5px] font-semibold dark:text-gray-100"},"Add to existing menu",-1)),e("span",kr,'New items join "'+o(x.value)+'"',1)])]),e("button",{onClick:Z,class:"flex items-center gap-3 text-left bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-xl px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700/50"},[...t[46]||(t[46]=[e("span",{class:"text-lg"},"â",-1),e("span",{class:"flex-1"},[e("span",{class:"block text-[13.5px] font-semibold dark:text-gray-100"},"Use a different name"),e("span",{class:"block text-[12px] text-gray-400 dark:text-gray-500 mt-0.5"},"Create a separate menu")],-1)])])]),e("button",{onClick:t[6]||(t[6]=g=>y.value=!1),class:"mt-4 w-full text-gray-400 dark:text-gray-500 text-[13px] py-1.5"}," Cancel ")])])):f("",!0),$.value?(s(),d("div",{key:1,onClick:t[12]||(t[12]=g=>$.value=!1),class:"fixed inset-0 z-[80] bg-black/45 flex items-center justify-center p-4"},[e("div",{onClick:t[11]||(t[11]=j(()=>{},["stop"])),class:"w-[400px] max-w-full bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-2xl"},[t[49]||(t[49]=e("h3",{class:"text-[16px] font-bold dark:text-gray-100 mb-4"}," Name your new menu ",-1)),t[50]||(t[50]=e("label",{class:"block text-[13px] font-semibold mb-1.5 dark:text-gray-200"},"Menu name",-1)),N(e("input",{"onUpdate:modelValue":t[9]||(t[9]=g=>v.value=g),onKeydown:ne(ee,["enter"]),class:"w-full border dark:border-gray-600 border-gray-300 rounded-lg px-3 py-2.5 text-sm bg-white dark:bg-gray-900 dark:text-gray-100 outline-none focus:border-dinesurf-green-500"},null,544),[[z,v.value]]),e("div",wr,[e("button",{onClick:t[10]||(t[10]=g=>$.value=!1),class:"bg-white dark:bg-gray-800 border dark:border-gray-700 rounded-lg px-4 py-2 text-[13.5px] font-semibold text-gray-600 dark:text-gray-300"}," Cancel "),e("button",{onClick:ee,class:"bg-dinesurf-green-600 hover:bg-dinesurf-green-700 text-white rounded-lg px-5 py-2 text-[13.5px] font-semibold"}," Save ")])])])):f("",!0)]),_:1}))}}),jr=Ne(hr,[["__scopeId","data-v-a094528e"]]);export{jr as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.