import{a as k}from"./chunk-XEAMYONT.js";import{q as I}from"./chunk-44IJDNPI.js";import{$ as p,Ha as h,J as l,Ja as O,O as f,P as g,Pa as S,aa as n,da as _,e as c,fb as B,ja as m,jb as y,la as u,pa as w,sa as r,sb as F,ta as a,ua as C,vb as M,xa as b,ya as x,za as v}from"./chunk-AZDFANJY.js";function P(i,s){i&1&&(r(0,"div",1),C(1,"afs-icon",2),a())}function T(i,s){if(i&1){let e=b();r(0,"div",4),x("click",function(){let o=f(e).$implicit,d=v(2);return g(d.openBoard(o))}),h(1),a()}if(i&2){let e=s.$implicit;p(),O(" ",e.title," ")}}function j(i,s){if(i&1&&m(0,T,2,1,"div",3),i&2){let e=v();u("ngForOf",e.boards)}}var D=(()=>{class i{constructor(e,t,o,d){this.boardSrv=e,this.navigationSrv=t,this.ngZone=o,this.toastSrv=d,this.isLoading=!0,this.boards=[],this.loadBoards()}loadBoards(){return c(this,null,function*(){let e=yield this.boardSrv.getBoardList();if(e.success)this.ngZone.run(()=>{this.boards=e.data,this.isLoading=!1});else return this.toastSrv.showError({message:e.message})})}openBoard(e){return c(this,null,function*(){yield this.navigationSrv.navigateForward({path:`/${e.id}`,mergeQueryParams:!0})})}static{this.\u0275fac=function(t){return new(t||i)(n(k),n(F),n(_),n(I))}}static{this.\u0275cmp=l({type:i,selectors:[["app-board-overview"]],standalone:!0,features:[S],decls:3,vars:1,consts:[["id","board-overview"],[1,"loading"],["name","fa-loading"],["class","board-item",3,"click",4,"ngFor","ngForOf"],[1,"board-item",3,"click"]],template:function(t,o){t&1&&(r(0,"section",0),m(1,P,2,0,"div",1)(2,j,1,1),a()),t&2&&(p(),w(1,o.isLoading?1:2))},dependencies:[y,B,M],styles:["#board-overview[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:15px;padding:20px;flex-wrap:wrap}#board-overview[_ngcontent-%COMP%]   .board-item[_ngcontent-%COMP%]{background:var(--background2);border:1px solid var(--border-color);border-radius:10px;cursor:pointer;font-size:20px;font-weight:400;padding:25px 50px;transition:opacity .2s}#board-overview[_ngcontent-%COMP%]   .board-item[_ngcontent-%COMP%]:hover{opacity:.7}"]})}}return i})();export{D as BoardOverviewComponent};
