PageSourceSearch

https://menuchat-frontend.vercel.app/_next/static/chunks/3058.414c8dcba8601b7e.js

js menuchat-frontend.vercel.app collected 2026-10-03 07:18:55 UTC 4,505 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3058],{83058:(e,s,a)=>{a.r(s),a.d(s,{MergeCategoriesSheet:()=>d});var t=a(95155),l=a(12337),r=a(31609),n=a(69323),i=a(98867),c=a(14505),o=a(29602);function d(e){let{open:s,onClose:a,categories:d,selectedCategoryIds:x,onToggleCategory:m,mergeTargetName:h,setMergeTargetName:g,mergeTargetIcon:u,setMergeTargetIcon:p,isMerging:b,onConfirmMerge:j}=e,f=x.length,N=d.filter(e=>x.includes(e.id)).reduce((e,s)=>e+s.dishes.length,0),y=f>=2&&h.trim().length>0&&!b;return(0,t.jsxs)(l.X,{open:s,onClose:()=>!b&&a(),children:[(0,t.jsx)(l.X.Header,{title:"Unisci Categorie",subtitle:"Seleziona le categorie da unire e scegli il nome finale",children:(0,t.jsx)(n.A,{className:"h-7 w-7 shrink-0 text-teal-500","aria-hidden":!0})}),(0,t.jsxs)(l.X.Body,{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mb-2 flex items-center gap-2 text-sm font-semibold text-gray-700",children:[(0,t.jsx)("span",{children:"\uD83D\uDCDD"})," Nome categoria risultante"," ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:h,onChange:e=>g(e.target.value),placeholder:"es. Primi Piatti",className:"w-full rounded-xl border-2 border-gray-200 bg-white px-4 py-3.5 font-medium text-gray-800 placeholder:text-gray-400 transition-all focus:border-teal-500 focus:ring-2 focus:ring-teal-500"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mb-2 flex items-center gap-2 text-sm font-semibold text-gray-700",children:[(0,t.jsx)("span",{children:"\uD83C\uDFA8"})," Icona (opzionale)"]}),(0,t.jsx)("input",{type:"text",value:u,onChange:e=>p(e.target.value),placeholder:"\uD83C\uDF5D",className:"w-24 rounded-xl border-2 border-gray-200 bg-white px-4 py-3.5 text-center text-2xl placeholder:text-gray-400 transition-all focus:border-teal-500 focus:ring-2 focus:ring-teal-500"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mb-3 flex items-center gap-2 text-sm font-semibold text-gray-700",children:[(0,t.jsx)("span",{children:"\uD83D\uDCC2"})," Seleziona categorie da unire"," ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"ml-auto text-xs font-normal text-gray-500",children:["(",f," selezionate)"]})]}),(0,t.jsx)("div",{className:"max-h-[300px] space-y-2 overflow-y-auto rounded-xl border border-gray-200 bg-gray-50 p-3",children:d.map(e=>{let s=x.includes(e.id);return(0,t.jsxs)("button",{type:"button",onClick:()=>m(e.id),className:(0,o.cn)("flex w-full items-center gap-3 rounded-xl p-3 transition-all",s?"border-2 border-teal-400 bg-teal-100":"border-2 border-transparent bg-white hover:bg-gray-100"),children:[(0,t.jsx)("div",{className:(0,o.cn)("flex h-6 w-6 items-center justify-center rounded-lg transition-all",s?"bg-teal-500 text-white":"bg-gray-200"),children:s&&(0,t.jsx)(i.A,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"text-2xl",children:e.icon}),(0,t.jsxs)("div",{className:"flex-1 text-left",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-800",children:e.name}),(0,t.jsxs)("span",{className:"ml-2 text-xs text-gray-500",children:["(",e.dishes.length," piatti)"]})]})]},e.id)})}),f<2&&(0,t.jsx)("p",{className:"mt-2 flex items-center gap-1 text-xs text-amber-600",children:"⚠️ Seleziona almeno 2 categorie da unire"})]}),f>=2&&(0,t.jsxs)("div",{className:"rounded-xl border border-teal-200 bg-teal-50 p-4",children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-semibold text-teal-800",children:"\uD83D\uDCCB Riepilogo unione:"}),(0,t.jsxs)("ul",{className:"space-y-1 text-sm text-teal-700",children:[(0,t.jsxs)("li",{children:["• ",(0,t.jsx)("strong",{children:f})," categorie verranno unite"]}),(0,t.jsxs)("li",{children:["• ",(0,t.jsx)("strong",{children:N})," piatti totali nella nuova categoria"]}),(0,t.jsx)("li",{children:"• Le categorie originali verranno eliminate"})]})]})]}),(0,t.jsxs)(l.X.Footer,{className:"space-y-3",children:[(0,t.jsx)(r.S,{className:"h-12 w-full text-base font-semibold bg-gradient-to-r from-teal-500 to-cyan-500 hover:from-teal-600 hover:to-cyan-600",onClick:j,disabled:!y,children:b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{className:"mr-2 h-5 w-5 animate-spin"}),"Unione in corso..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.A,{className:"mr-2 h-5 w-5"}),"Unisci ",f," Categorie"]})}),(0,t.jsx)(r.S,{className:"h-12 w-full text-base font-medium",variant:"outline",onClick:a,disabled:b,children:"Annulla"})]})]})}}}]);

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.