import{A as a,ab as h,ed as u,l as r,p as c}from"./chunk-7PFTODKS.js";var K=["stable","experimental","deprecated"],f=class n{kindRegistry=c(u);searchText=a("");selectedKinds=a([]);selectedStabilities=a([]);hasIssuesOnly=a(!1);isActive=h(()=>this.searchText().trim().length>0||this.selectedKinds().length>0||this.selectedStabilities().length>0||this.hasIssuesOnly());setSearchText(e){this.searchText.set(e)}setKinds(e){this.selectedKinds.set([...e])}toggleKind(e){let t=this.selectedKinds(),d=this.kindRegistry.kinds().map(l=>l.name),s=t.length===0?new Set(d):new Set(t);s.has(e)?s.delete(e):s.add(e),s.size===d.length?this.selectedKinds.set([]):this.selectedKinds.set([...s])}isKindActive(e){let t=this.selectedKinds();return t.length===0?!0:t.includes(e)}setStabilities(e){this.selectedStabilities.set([...e])}setHasIssuesOnly(e){this.hasIssuesOnly.set(e)}reset(){this.searchText.set(""),this.selectedKinds.set([]),this.selectedStabilities.set([]),this.hasIssuesOnly.set(!1)}apply(e){let t=this.searchText().trim().toLowerCase(),d=this.selectedKinds(),s=this.selectedStabilities(),l=this.hasIssuesOnly();return e.filter(i=>{if(t&&![i.path,i.frontmatter.name??"",i.frontmatter.description??""].join(" ").toLowerCase().includes(t)||d.length>0&&!d.includes(i.kind))return!1;if(s.length>0){let o=i.frontmatter.metadata?.stability;if(!o||!s.includes(o))return!1}return!(l&&!y(i))})}static \u0275fac=function(t){return new(t||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};function y(n){let e=n.frontmatter.metadata;return e?e.stability==="deprecated"||!!e.supersededBy:!1}export{K as a,f as b};
