1import{r as o,j as e,m as h}from"./vendor-motion-9qIbWfdh.js";import{h as v,H as d,k as x,N as u,j as g,a7 as p,aV as j,aW as f,av as k,aX as N,a as w,ae as c}from"./index-RER_5nha.js";import"./vendor-react-C0Dkio3Y.js";import"./vendor-query-CrasLRbE.js";import"./vendor-charts-JEUKlbbs.js";const b={best:{label:"Best",color:"bg-green-500/20 text-green-400 border-green-500/30",icon:w},okay:{label:"Okay",color:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",icon:N},avoid:{label:"Avoid",color:"bg-red-500/20 text-red-400 border-red-500/30",icon:k}};function m({item:t,label:s}){if(!t)return null;const a=b[t.tier];return e.jsxs(p,{className:"p-4 bg-[#151A21] border-white/5","data-testid":`card-pick-${s.toLowerCase().replace(/\s/g,"-")}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a.icon,{className:"w-4 h-4 text-[#00FFC3]/70"}),e.jsx("span",{className:"text-[10px] font-semibold text-[#00FFC3]/70 uppercase tracking-wider",children:s})]}),e.jsx(c,{variant:"outline",className:`text-[10px] border ${a.color} no-default-hover-elevate no-default-active-elevate`,children:a.label})]}),e.jsx("p",{className:"text-sm font-medium text-white","data-testid":`text-pick-name-${s.toLowerCase().replace(/\s/g,"-")}`,children:t.name}),t.tags.length>0&&e.jsx("div",{className:"flex gap-1.5 mt-2",children:t.tags.map((i,n)=>e.jsx(c,{variant:"outline",className:"text-[9px] text-white/40 border-white/10 no-default-hover-elevate no-default-active-elevate",children:i},n))})]})}function y({item:t,index:s}){const a=b[t.tier];return e.jsxs("div",{className:"flex items-center gap-3 py-2.5 border-b border-white/5 last:border-0","data-testid":`row-analysis-item-${s}`,children:[e.jsx("span",{className:"text-[10px] text-white/20 w-4 text-right shrink-0",children:s+1}),e.jsx(c,{variant:"outline",className:`text-[9px] border shrink-0 ${a.color} no-default-hover-elevate no-default-active-elevate`,children:a.label}),e.jsx("span",{className:"text-xs text-white flex-1 truncate",children:t.name}),e.jsx("div",{className:"flex gap-1 shrink-0",children:t.tags.map((i,n)=>e.jsx(c,{variant:"outline",className:"text-[8px] text-white/30 border-white/10 no-default-hover-elevate no-default-active-elevate",children:i},n))})]})}function E(){const[,t]=v(),[s,a]=o.useState(null),[i,n]=o.useState("quick");return o.useEffect(()=>{const r=sessionStorage.getItem("menu_scan_result"),l=sessionStorage.getItem("menu_scan_mode");if(r)try{a(JSON.parse(r))}catch{}l&&n(l),d("menu_scan_result_viewed",{mode:l||"quick"})},[]),s?e.jsxs("div",{className:"min-h-screen bg-[#0A0E14] pb-32 max-w-lg lg:max-w-2xl mx-auto",children:[e.jsx("div",{className:"bg-[#0A0E14] px-6 pb-4 sticky top-0 z-10 border-b border-white/5",style:{paddingTop:"calc(env(safe-area-inset-top, 0px) + 8px)"},children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(g,{"data-testid":"button-back-menu-result"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-xl font-bold text-white","data-testid":"text-menu-result-title",children:i==="quick"?"Top Picks":"Full Breakdown"}),e.jsxs("p",{className:"text-xs text-white/40",children:[s.items.length," items analyzed"]})]})]})}),e.jsxs("div",{className:"px-6 py-6 space-y-4",children:[i==="quick"?e.jsxs(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-3",children:[e.jsx(m,{item:s.topPicks.best,label:"Best Choice"}),e.jsx(m,{item:s.topPicks.balanced,label:"Balanced Choice"}),e.jsx(m,{item:s.topPicks.treat,label:"Treat Option"})]}):e.jsx(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:e.jsx(p,{className:"p-4 bg-[#151A21] border-white/5","data-testid":"card-analysis-list",children:s.items.map((r,l)=>e.jsx(y,{item:r,index:l},l))})}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsxs(x,{className:"flex-1 bg-[#00FFC3]/10 hover:bg-[#00FFC3]/20 text-[#00FFC3] border border-[#00FFC3]/20",onClick:()=>{d("menu_scan_next_clicked"),t("/")},"data-testid":"button-scan-next",children:[e.jsx(j,{className:"w-4 h-4 mr-2"}),"Scan Next"]}),e.jsxs(x,{variant:"outline",className:"flex-1 border-white/10 text-white/60 hover:text-white hover:bg-white/5",onClick:()=>{d("menu_scan_ask_kosmo_clicked"),t("/ask-kosmo")},"data-testid":"button-ask-kosmo",children:[e.jsx(f,{className:"w-4 h-4 mr-2"}),"Ask Kosmo"]})]})]}),e.jsx(u,{})]}):e.jsxs("div",{className:"min-h-screen bg-[#0A0E14] flex items-center justify-center",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("p",{className:"text-sm text-white/40",children:"No scan results found."}),e.jsx(x,{variant:"outline",onClick:()=>t("/menu-scan"),"data-testid":"button-go-back-no-results",children:"Go Back"})]}),e.jsx(u,{})]})}
1export{E 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.