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