import{j as e,T as c,I as n,aT as x,p as d,aU as o,n as m}from"./index-CHfgriyV.js";function f({length:s}){if(!(!s||s<=0))return e.jsxs(c,{size:"sm",className:"text-error flex items-center gap-1",children:[e.jsx(n,{type:"exclamation-circle",size:"sm"}),s," ",s===1?"error":"errors"]})}function j({items:s}){const a=s[0],t=s.slice(1);return s.length<=1?e.jsx(i,{...a}):e.jsxs(x,{className:"group",children:[e.jsxs(d,{slot:"trigger",className:"flex min-w-0 max-w-full items-start gap-2",children:[e.jsx(i,{...a}),e.jsxs("div",{className:"bg-foreground-black text-on-brand flex shrink-0 items-center rounded-full px-1.5 py-0.5",children:[e.jsxs(c,{variant:"body",size:"xs",className:"px-1 group-[&[data-expanded=true]]:hidden",children:["+",s.length-1]}),e.jsx("div",{className:"flex h-5 items-center px-1",children:e.jsx("div",{className:"transition-all group-[&[data-expanded=true]]:rotate-180",children:e.jsx(n,{type:"caret-down",size:"sm"})})})]})]}),e.jsx(o,{children:e.jsx("div",{className:"mt-4 flex flex-col gap-4",children:t.map((r,l)=>e.jsx(i,{...r},`${r.value}${l}`))})})]})}function i({icon:s,tag:a,value:t,subValue:r}){return e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[t&&e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(n,{type:s,size:"lg"}),a&&e.jsx(m,{variant:"source",radius:"sqrt",className:"max-w-1/3",size:"sm",children:a.toUpperCase()}),e.jsx(c,{variant:"body",size:"md",className:"text-primary truncate",children:t})]}),r&&e.jsx(c,{variant:"body",size:"sm",className:"text-secondary truncate text-left",children:r})]})}export{f as E,j as a};
