1import{r,j as e}from"./app-BeGqF6ux.js";import{M as m,b as t}from"./Tooltip-DYcxt1UG.js";import"./index-Dkf2GVy1.js";import"./dayjs-BlgjZc9C.js";import"./button.styles-7lPNyjJO.js";import"./iconBase-CN8tsjra.js";import"./useTranslation-kJHeU9i8.js";import"./helpers-CgA5RTdO.js";const y=({isOpen:d,onClose:i,aggregateStats:l})=>{const[s,n]=r.useState(null);r.useEffect(()=>{l&&n(l)},[l]);const a=()=>{i()};return e.jsx(m,{open:d,onClose:a,size:"lg",header:{title:"Hardware ID Validation",variant:"info"},footer:{primaryAction:{label:"Close",onClick:a,variant:"primary"}},children:e.jsx("div",{className:"space-y-6",children:s&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-4",children:[e.jsx("div",{className:"text-2xl font-bold text-type-black-primary",children:s.total}),e.jsx("div",{className:"text-sm text-type-black-secondary",children:"Total Records"})]}),e.jsxs("div",{className:"border-green-200 bg-green-50 rounded-lg border p-4",children:[e.jsx("div",{className:"text-green-700 text-2xl font-bold",children:s.valid.length}),e.jsx("div",{className:"text-green-700 text-sm",children:"Valid"})]}),e.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[e.jsx("div",{className:"text-2xl font-bold text-red-700",children:s.invalid.length}),e.jsx("div",{className:"text-sm text-red-700",children:"Not Found"})]})]}),s.invalid.length===0?e.jsx("div",{className:"border-green-200 bg-green-50 rounded-lg border p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(t,{name:"HiCheckCircle",className:"text-green-600",size:"sm"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-green-900 text-sm font-semibold",children:"All Hardware IDs Validated"}),e.jsxs("p",{className:"text-green-700 mt-1 text-sm",children:["All ",s.valid.length," hardware IDs were found in the database."]})]})]})}):e.jsx("div",{className:"border-yellow-200 bg-yellow-50 rounded-lg border p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(t,{name:"HiExclamationTriangle",className:"text-yellow-600",size:"sm"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-yellow-900 text-sm font-semibold",children:"Some Hardware IDs Not Found"}),e.jsxs("p",{className:"text-yellow-700 mt-1 text-sm",children:[s.invalid.length," hardware ID(s) were not found in the database. You can still proceed with the ",s.valid.length," valid ID(s)."]})]})]})}),s.invalid.length>0&&s.invalid.length<=600&&e.jsxs("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[e.jsx("h4",{className:"mb-2 text-sm font-semibold text-type-black-primary",children:"Invalid Hardware IDs:"}),e.jsx("div",{className:"max-h-40 overflow-y-auto",children:e.jsx("ul",{className:"space-y-1 text-sm text-type-black-secondary",children:s.invalid.map((o,c)=>e.jsx("li",{className:"font-mono",children:o},c))})})]}),s.invalid.length>600&&e.jsxs("p",{className:"text-sm text-type-black-secondary",children:["Too many invalid IDs to display (",s.invalid.length," total)"]})]})})})};export{y as HardwareIdValidationModal};
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.