import{j as e,T as t,I as c,as as d,h as x,at as o}from"./index-BX768Frx.js";import{T as m}from"./tag-DIbqHQC5.js";function j({length:s}){if(!(!s||s<=0))return e.jsxs(t,{size:"sm",className:"text-error flex items-center gap-1",children:[e.jsx(c,{type:"exclamation-circle",size:"sm"}),s," ",s===1?"error":"errors"]})}function u({items:s}){const a=s[0],r=s.slice(1);return s.length<=1?e.jsx(i,{...a}):e.jsxs(d,{className:"group",children:[e.jsxs(x,{slot:"trigger",className:"flex max-w-full min-w-0 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(t,{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(c,{type:"caret-down",size:"sm"})})})]})]}),e.jsx(o,{children:e.jsx("div",{className:"mt-4 flex flex-col gap-4",children:r.map((n,l)=>e.jsx(i,{...n},`${n.value}${l}`))})})]})}function i({tag:s,value:a,subValue:r}){return e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[a&&e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(m,{variant:"brand",radius:"sqrt",className:"max-w-1/3",size:"sm",children:s.toUpperCase()}),e.jsx(t,{variant:"body",size:"md",className:"text-primary truncate",children:a})]}),r&&e.jsx(t,{variant:"body",size:"sm",className:"text-secondary truncate text-left",children:r})]})}export{j as E,u as a};
