import{e as b}from"./chunk-DQ3OEJZG.js";import{e as l,f as Q}from"./chunk-2IS66YGF.js";import{B as M,t as _}from"./chunk-NPSSOGJG.js";import{$b as c,Ad as v,Bb as f,Hb as A,Sb as a,ac as r,bc as g,kc as u,lc as h,mc as C,ob as m,pc as w,pd as y,qc as x,rc as s,sc as d}from"./chunk-NYZDFFAU.js";var E=["*"];function I(t,P){if(t&1&&(c(0,"div",3),g(1,"paw-action",4),r()),t&2){let o=u();m(),a("id",(o.id?o.id+"-":"accordion-")+o.toggleAllAction.id)("action",o.toggleAllAction)}}var z=(()=>{class t{constructor(){this.toggle=!0,this.toggleAllAction={id:"toggle-all-panels",label:"HideAll",icon:"fa-regular fa-chevron-down paw-font-size-xs",styleClass:"paw-accordion-panel-toggle",onSelected:o=>{if(this.allCollapsed){this.expandAll(),this.allCollapsed=!1;return}this.collapseAll(),this.allCollapsed=!0}},this.allCollapsed=!0}ngOnInit(){this.toggleAllAction.label=this.allCollapsed?"ShowAll":"HideAll"}ngAfterViewInit(){this.panels.forEach(o=>{o.expansionPanel.accordion=this.matAccordion})}expandAll(){this.panels.forEach(o=>{o.expansionPanel.accordion=this.matAccordion,o.expansionPanel.open()}),this.toggleAllAction.label="HideAll"}collapseAll(){this.panels.forEach(o=>{o.expansionPanel.accordion=this.matAccordion,o.expansionPanel.close()}),this.toggleAllAction.label="ShowAll"}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=f({type:t,selectors:[["paw-accordion"]],contentQueries:function(e,i,n){if(e&1&&w(n,b,5),e&2){let p;s(p=d())&&(i.panels=p)}},viewQuery:function(e,i){if(e&1&&x(l,7),e&2){let n;s(n=d())&&(i.matAccordion=n.first)}},inputs:{toggle:"toggle",id:"id"},ngContentSelectors:E,decls:5,vars:1,consts:[["matAccordion",""],["class","paw-padding-bottom-s",4,"ngIf"],["multi",""],[1,"paw-padding-bottom-s"],[3,"id","action"]],template:function(e,i){e&1&&(h(),A(0,I,2,2,"div",1),c(1,"div")(2,"mat-accordion",2,0),C(4),r()()),e&2&&a("ngIf",i.toggle)},dependencies:[v,y,Q,l,M,_],encapsulation:2})}}return t})();export{z as a};
