import{a as r}from"./chunk-RSCRFTDH.js";import"./chunk-UMAB7ZHZ.js";import"./chunk-MJMWESWV.js";import{a as O}from"./chunk-DZIBSTYD.js";import{e as L}from"./chunk-UNOCMEIJ.js";import{K as B,L as D,M as F,N,O as A,P as R,X as k,s as M}from"./chunk-V3OQRKWZ.js";import"./chunk-TKAIWFNJ.js";import"./chunk-PNYG45OP.js";import{E as I,v as P}from"./chunk-RH7PHCHG.js";import"./chunk-W6CHQRLA.js";import"./chunk-4TDNJBFX.js";import{q as _,r as h}from"./chunk-WHAZRQUZ.js";import"./chunk-SLF6YM5O.js";import{Ab as x,Bc as o,Eb as E,Fd as T,Kb as s,Vb as p,Vc as u,cc as n,dc as i,ec as g,rb as m,td as v,yc as y,zc as C}from"./chunk-LPGDQDOD.js";function Q(t,c){if(t&1&&g(0,"paw-action",12),t&2){let l=c.$implicit;p("action",l)("eventBubbling",!1)}}function U(t,c){t&1&&o(0," PANEL TEST ")}function j(t,c){t&1&&o(0," PANEL TEST ")}function H(t,c){t&1&&o(0," PANEL TEST B ")}function V(t,c){t&1&&o(0," PANEL TEST C ")}var re=(()=>{class t{constructor(){this.fewPeople=r.randomItems(()=>r.randomFullName()),this.demoItems=r.randomItems(l=>({id:l+1,task:r.gibberish(),assignedTo:r.randomItem(this.fewPeople),createdBy:r.randomItem(this.fewPeople),feature:r.gibberish(3)}),1,r.randomNumber(1,1e3)),this.panelSettings={title:"PAW Panel test",actions:[{id:"actionA",label:"Action A",icon:"far fa-save",onSelected:()=>{console.log("Action A")}},{id:"actionB",label:"Action B",icon:"far fa-copy"},{id:"actionC",label:"Action C",icon:"far fa-file"}]},this.panelA={actions:[{id:"actionA",label:"Action A",icon:"far fa-save",onSelected:(l,a)=>{console.log("args",l,a),a.stopImmediatePropagation()}},{id:"actionB",label:"Action B",icon:"far fa-copy"},{id:"actionC",label:"Action C",icon:"far fa-file"}],grid:{cols:[{id:"id",label:"ID",pinned:"left",width:60},{id:"task",label:"Task"},{id:"assignedTo",label:"Assigned",flex:1},{id:"createdBy",label:"Created by",flex:1},{id:"feature",label:"Feature",flex:2},{id:"storyPoints",label:"Story points",inputField:{id:"storyPoints",component:M}}],settings:{loadData:(l,a,e)=>{let w=this.demoItems;h.isSet(e)&&e.order=="asc"&&(w=this.demoItems.sort((S,b)=>{let d=S[e.column],f=b[e.column];return d>f?1:d<f?-1:0})),h.isSet(e)&&e.order=="desc"&&(w=this.demoItems.sort((S,b)=>{let d=S[e.column],f=b[e.column];return d>f?-1:d<f?1:0}));let q={items:_.range(this.demoItems,l,a),totalItems:this.demoItems.length};return r.randomRequest(q)},selectableRows:!0,selectByProperty:"id",rowActions:[{id:"demo-action",label:"Demo action",onSelected:()=>{console.log("ACTION SELECTED")}}]}}},this.toggleAllAction={id:"toggle-all-panels",label:"Skrij vse",styleClass:"paw-accordion-panel-toggle",onSelected:()=>{if(this.allCollapsed){this.accordion().openAll(),this.allCollapsed=!1;return}this.accordion().closeAll(),this.allCollapsed=!0}},this.accordion=x.required(A),this.allCollapsed=!0}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=E({type:t,selectors:[["paw-sb-accordion"]],viewQuery:function(a,e){a&1&&y(e.accordion,A,5),a&2&&C()},decls:43,vars:8,consts:[["contentTpl",""],[3,"action"],["multi",""],[1,"paw-mat-expansion-panel"],[1,"paw-area-h","paw-width-fit"],[1,"paw-col-d"],[1,"paw-col","paw-mat-expansion-panel-actions"],["class","paw-margin-left-xs paw-margin-right-xs","type","paw-action-icon",3,"action","eventBubbling",4,"ngFor","ngForOf"],[2,"height","200px"],[3,"cols","settings"],["disabled","",1,"paw-mat-expansion-panel"],[3,"settings"],["type","paw-action-icon",1,"paw-margin-left-xs","paw-margin-right-xs",3,"action","eventBubbling"]],template:function(a,e){a&1&&(n(0,"p"),o(1,"sb-accordion works!"),i(),n(2,"div")(3,"div"),g(4,"paw-action",1),i(),n(5,"mat-accordion",2)(6,"mat-expansion-panel",3)(7,"mat-expansion-panel-header")(8,"mat-panel-title"),o(9," Personal data "),i(),n(10,"mat-panel-description")(11,"div",4),g(12,"div",5),n(13,"div",6),s(14,Q,1,2,"paw-action",7),i()()()(),n(15,"div",8),g(16,"paw-datagrid",9),i()(),n(17,"mat-expansion-panel",10)(18,"mat-expansion-panel-header")(19,"mat-panel-title"),o(20," Destination "),i(),n(21,"mat-panel-description"),o(22," Type the country name "),i()()(),n(23,"mat-expansion-panel",3)(24,"mat-expansion-panel-header")(25,"mat-panel-title"),o(26," Day of the trip "),i(),n(27,"mat-panel-description"),o(28," Inform the date you wish to travel "),i()(),o(29," TEST "),i(),n(30,"paw-panel",11),s(31,U,1,0,"ng-template",null,0,u),i()(),n(33,"paw-accordion")(34,"paw-panel",11),s(35,j,1,0,"ng-template",null,0,u),i(),n(37,"paw-panel",11),s(38,H,1,0,"ng-template",null,0,u),i(),n(40,"paw-panel",11),s(41,V,1,0,"ng-template",null,0,u),i()()()),a&2&&(m(4),p("action",e.toggleAllAction),m(10),p("ngForOf",e.panelA.actions),m(2),p("cols",e.panelA.grid.cols)("settings",e.panelA.grid.settings),m(14),p("settings",e.panelSettings),m(4),p("settings",e.panelSettings),m(3),p("settings",e.panelSettings),m(3),p("settings",e.panelSettings))},dependencies:[T,v,R,A,B,D,N,F,I,P,k,L,O],encapsulation:2})}}return t})();export{re as SbAccordionComponent};
