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