import{Button as D,Input as Q}from"@contractspec/lib.design-system";import{HStack as E,VStack as R}from"@contractspec/lib.ui-kit-web/ui/stack";import{cn as U}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as z,jsxs as P}from"react/jsx-runtime";function W({uniqueTags:C,uniqueStabilities:F,filters:d,setSearch:G,toggleTag:J,toggleStability:K,clearFilters:L,hasActiveFilters:M,className:O}){return P(R,{gap:"md",className:U("w-full",O),children:[P(E,{gap:"md",justify:"between",className:"w-full",children:[z(Q,{placeholder:"Search features...",value:d.search,onChange:(p)=>G(p.target.value),className:"max-w-md","aria-label":"Search features"}),M&&z(D,{variant:"ghost",size:"sm",onClick:L,children:"Clear filters"})]}),F.length>0&&P(E,{gap:"xs",wrap:"wrap",children:[z("span",{className:"text-muted-foreground text-sm",children:"Stability:"}),F.map((p)=>z(D,{variant:d.stability.includes(p)?"default":"outline",size:"sm",onClick:()=>K(p),"aria-pressed":d.stability.includes(p),children:p},p))]}),C.length>0&&P(E,{gap:"xs",wrap:"wrap",children:[z("span",{className:"text-muted-foreground text-sm",children:"Tags:"}),C.slice(0,10).map((p)=>P(D,{variant:d.tags.includes(p)?"default":"outline",size:"sm",onClick:()=>J(p),"aria-pressed":d.tags.includes(p),children:["#",p]},p)),C.length>10&&P("span",{className:"text-muted-foreground text-sm",children:["+",C.length-10," more"]})]})]})}export{W as FeatureFiltersBar};
