import{b as ce}from"./chunk-FVVYD7H6.js";import{a as se}from"./chunk-DUS4LJU5.js";import{a as fe}from"./chunk-V5O2TXLS.js";import"./chunk-KZKY3ROD.js";import{A as ne,B as oe,D as re,E as ae,F as le,k as K,l as Q,m as U,q as W,r as X,t as Z,u as ee,w as te,y as ie}from"./chunk-R3KWJKU7.js";import"./chunk-CC3PIS5F.js";import"./chunk-7ZFHDZI4.js";import{b as J}from"./chunk-SPNVV2KO.js";import{r as pe,s as me}from"./chunk-BGV4AOSB.js";import"./chunk-2SZ4MB2K.js";import"./chunk-N7PC5CHF.js";import"./chunk-ZTKV4AIV.js";import{cb as z}from"./chunk-JIDGXFMJ.js";import{c as j,g as k,h as L,l as Y,n as G,z as q}from"./chunk-MTR2L2TG.js";import"./chunk-5JDCLYZA.js";import{j as de}from"./chunk-YJYOGSOO.js";import{h as P}from"./chunk-73IMXZSJ.js";import{ia as F,oa as O}from"./chunk-KVTHJWZA.js";import{Ab as c,Bc as H,Cc as B,Hb as u,Ic as a,Jc as m,Kc as V,Mc as $,Ob as w,Sb as n,Tb as o,Ub as C,Vb as b,Wb as _,Yb as I,aa as x,ha as D,hb as i,ib as N,ic as R,jc as A,mc as S,na as v,qa as T,rb as y,va as E,vc as r,wa as M,wc as p}from"./chunk-FWZCAEAJ.js";import"./chunk-CWTPBX7D.js";var ue=(()=>{let t=class t{constructor(){this.url="/config/mediator",this.httpClient=v(P),this.selectedOrganisationService=v(ce)}getAll$(){return this.selectedOrganisationService.selectedIdNotNull$.pipe(x(s=>this.httpClient.get(this.url,{params:{organisationId:s}})))}};t.\u0275fac=function(d){return new(d||t)},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function _e(e,t){if(e&1){let l=I();n(0,"button",15),R("click",function(){E(l);let d=A();return M(d.filter.reset())}),a(1,"tr"),C(2,"bi",16),o()}e&2&&S("ngbTooltip",m(1,1,"CLEAR"))}function ge(e,t){e&1&&(n(0,"th",17),r(1,"#"),o())}function he(e,t){if(e&1&&(n(0,"td",18),r(1),o()),e&2){let l=t.$implicit;i(),p(l.id)}}function ve(e,t){e&1&&(n(0,"th",17),r(1),a(2,"tr"),o()),e&2&&(i(),p(m(2,1,"NAME")))}function Se(e,t){if(e&1&&(n(0,"td",18),r(1),o()),e&2){let l=t.$implicit;i(),p(l.name)}}function xe(e,t){e&1&&(n(0,"th",17),r(1),a(2,"tr"),o()),e&2&&(i(),p(m(2,1,"ACTIVE")))}function De(e,t){if(e&1&&(n(0,"td",18),r(1),o()),e&2){let l=t.$implicit;i(),p(l.active)}}function Te(e,t){e&1&&(n(0,"th",17),r(1),a(2,"tr"),o()),e&2&&(i(),p(m(2,1,"LAST_CONTACT")))}function Ee(e,t){if(e&1&&(n(0,"td",18),r(1),a(2,"date"),o()),e&2){let l=t.$implicit;i(),p(V(2,1,l.lastContact,"dd.MM.YYYY HH:mm:ss"))}}function Me(e,t){e&1&&(n(0,"th",17),r(1),a(2,"tr"),o()),e&2&&(i(),p(m(2,1,"NAV_PRINTERS")))}function Ne(e,t){if(e&1&&(n(0,"td",18),r(1),a(2,"s_implode"),a(3,"a_mapName"),o()),e&2){let l=t.$implicit;i(),p($(2,1,m(3,6,l.printers),", ",20,"..."))}}function ye(e,t){e&1&&C(0,"tr",19)}function we(e,t){e&1&&C(0,"tr",20)}var Ie=()=>[],Je=(()=>{let t=class t extends se{constructor(s){super(s),this.columnsToDisplay=["id","name","active","lastContact","printers"]}};t.\u0275fac=function(d){return new(d||t)(N(ue))},t.\u0275cmp=T({type:t,selectors:[["app-all-mediators"]],standalone:!0,features:[y,H],decls:29,vars:16,consts:[[1,"input-group"],["type","text",1,"form-control","ml-2",3,"formControl","placeholder"],["class","btn btn-outline-secondary","type","button","placement","bottom",3,"ngbTooltip"],[1,"table-responsive"],["ngb-table","","ngb-sort","",3,"hover","dataSource"],["ngbColumnDef","id"],["ngb-header-cell","","ngb-sort-header","",4,"ngbHeaderCellDef"],["ngb-cell","",4,"ngbCellDef"],["ngbColumnDef","name"],["ngbColumnDef","active"],["ngbColumnDef","lastContact"],["ngbColumnDef","printers"],["ngb-header-row","",4,"ngbHeaderRowDef"],["ngb-row","",4,"ngbRowDef","ngbRowDefColumns"],[3,"show"],["type","button","placement","bottom",1,"btn","btn-outline-secondary",3,"ngbTooltip","click"],["name","x-circle-fill"],["ngb-header-cell","","ngb-sort-header",""],["ngb-cell",""],["ngb-header-row",""],["ngb-row",""]],template:function(d,f){if(d&1&&(n(0,"h1"),r(1),a(2,"tr"),o(),n(3,"form")(4,"div",0),C(5,"input",1),a(6,"tr"),c(7,_e,3,3,"button",2),o()(),n(8,"div",3)(9,"table",4),a(10,"async"),b(11,5),c(12,ge,2,0,"th",6)(13,he,2,1,"td",7),_(),b(14,8),c(15,ve,3,3,"th",6)(16,Se,2,1,"td",7),_(),b(17,9),c(18,xe,3,3,"th",6)(19,De,2,1,"td",7),_(),b(20,10),c(21,Te,3,3,"th",6)(22,Ee,3,4,"td",7),_(),b(23,11),c(24,Me,3,3,"th",6)(25,Ne,4,8,"td",7),_(),c(26,ye,1,0,"tr",12)(27,we,1,0,"tr",13),o()(),C(28,"app-spinner-row",14)),d&2){let g,h;i(),p(m(2,9,"HOME_PRINTER_NAV_MEDIATOR")),i(4),S("placeholder",m(6,11,"SEARCH")),u("formControl",f.filter),i(2),w(7,((g=f.filter.value==null?null:f.filter.value.length)!==null&&g!==void 0?g:0)>0?7:-1),i(2),u("hover",!0)("dataSource",(h=m(10,13,f.dataSource$))!==null&&h!==void 0?h:B(15,Ie)),i(17),u("ngbHeaderRowDef",f.columnsToDisplay),i(),u("ngbRowDefColumns",f.columnsToDisplay),i(),u("show",f.isLoading())}},dependencies:[F,q,Y,j,k,L,G,O,z,de,le,ae,X,ie,Z,W,ne,ee,te,oe,re,U,K,Q,me,pe,J,fe],encapsulation:2,changeDetection:0});let e=t;return e})();export{Je as MediatorsComponent};
