1import{A as st,g as _,h as rt}from"./chunk-ZRLTYANT.js";import"./chunk-DJBZ6I3A.js";import{a as ot,b as bt}from"./chunk-PZJRV2IX.js";import{a as nt,b as Lt,c as at,d as Dt,e as mt,f as Ut,g as ct,h as It,i as lt,j as kt}from"./chunk-54IVIF23.js";import"./chunk-A3LMZDIJ.js";import"./chunk-QOBDBW7Y.js";import"./chunk-EW7IFL6P.js";import"./chunk-JB2XCSMC.js";import"./chunk-ZEFWU7S7.js";import"./chunk-SWLINWNL.js";import"./chunk-CTZ3ZYEA.js";import{d as et,e as vt}from"./chunk-4C2DMAJ7.js";import"./chunk-Y54GCYNG.js";import"./chunk-S6Q3UR7I.js";import"./chunk-MJPCYAIO.js";import{a as it,b as yt,c as D,d as St}from"./chunk-URHUZSUY.js";import"./chunk-DY27WKZZ.js";import{a as L,h as xt}from"./chunk-JUR2W2JA.js";import{Cb as tt,I as g,J as Y,P as Z,j as K,k as Ct,t as Q,u as Tt,x as X}from"./chunk-Y6KNM6ZB.js";import"./chunk-QMSUU534.js";import{$c as J,Kb as wt,db as $,eb as G,hb as H,kb as r,nb as W,p as h,yb as z}from"./chunk-EPTESH3C.js";import{C as O,K as gt,i as d,o as ht}from"./chunk-E47SSV5D.js";import"./chunk-R5IFAQPW.js";import{Ac as P,Ed as b,Fa as s,Fd as q,Hc as y,Ib as k,Mc as S,Oa as x,Oc as n,Pa as C,Yc as N,_b as R,ac as E,ad as m,be as f,cd as c,ec as B,md as V,qc as F,sc as M,ud as l,vd as p,xc as A,yc as T,yd as j,za as I,zc as v}from"./chunk-K3TCC32O.js";import{d as w}from"./chunk-XUNVPWCM.js";var U,ut=w(()=>{"use strict";f();wt();H();W();J();tt();ht();gt();st();xt();yt();St();kt();f();U=(()=>{class e{#e;#t;#i;#o;#r;#s;#n;#a;#m;#c;constructor(){this.#e=s(z),this.#t=s($),this.#i=s(Y),this.#o=s(Z),this.#r=s(O),this.#s=r(s(h).upMd$),this.#n=this.#e.selectSignal(D.selectUsers),this.#a=this.#e.selectSignal(D.selectUserListFilter),this.#m=b(()=>this.#s()?["name","policyNumber","userEmail","policyEmail","policyStatus","registrationStatus","sensorInfo","insuredType",_.Actions]:["name","policyNumber",_.Actions]),this.vm=b(()=>{let t=this.#n();return{users:t.data?.list??[],columns:this.#m(),columnLabels:this.#c,isLoading:t.isLoading,error:t.error}}),this.#c={name:r(this.#t.stream("admin.users.columns.name")),policyNumber:r(this.#t.stream("admin.users.columns.policy-number")),userEmail:r(this.#t.stream("admin.users.columns.user-email")),policyEmail:r(this.#t.stream("admin.users.columns.policy-email")),policyStatus:r(this.#t.stream("admin.users.columns.policy-status")),registrationStatus:r(this.#t.stream("admin.users.columns.registration-status")),sensorInfo:r(this.#t.stream("admin.users.columns.sensor-info")),insuredType:r(this.#t.stream("admin.users.columns.insured-type"))},q(()=>{this.vm().error&&this.showErrorToast(this.vm().error)})}init(){this.#e.dispatch(it.loadUsers({filter:this.#a()}))}showErrorToast(t){switch(t.status){case d.BadRequest:{this.#i.open(this.#t.stream("http-errors.400"),{type:g.Error});break}case d.NotFound:{this.#i.open(this.#t.stream("http-errors.404"),{type:g.Error});break}case d.InternalServerError:this.#i.open(this.#t.stream("http-errors.500"),{type:g.Error})}}navigateToDetails(t){this.#r.navigate(["/",L.Admin,L.AdminUsers,t.policyNumber],{queryParams:{userId:t.userId,insuredType:t.insuredType}})}openDetailsDialog(t){this.#o.open({component:lt,data:t,textAlign:"start",maxWidth:"936px"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac})}}return e})()});var ft,_t=w(()=>{"use strict";f();ft=(()=>{class e{static ngTemplateContextGuard(t,i){return!0}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=E({type:e,selectors:[["","adminUsersListRowTemplate",""]]})}}return e})()});function Rt(e,a){if(e&1&&(m(0),l(1,"formatPolicyStatus")),e&2){let t=n(),i=t.row,o=t.column;c(" ",p(1,1,i[o])," ")}}function Et(e,a){if(e&1&&(m(0),l(1,"formatRegistrationStatus")),e&2){let t=n(),i=t.row,o=t.column;c(" ",p(1,1,i[o])," ")}}function Bt(e,a){if(e&1&&(m(0),l(1,"formatSensorInfo")),e&2){let t=n(),i=t.row,o=t.column;c(" ",p(1,1,i[o])," ")}}function Ft(e,a){if(e&1&&(m(0),l(1,"formatInsuredType")),e&2){let t=n(),i=t.row,o=t.column;c(" ",p(1,1,i[o])," ")}}function Mt(e,a){if(e&1){let t=y();T(0,"button",5),S("click",function(){x(t);let o=n().row,u=n();return C(u.onRowClick(o))}),v()}}function At(e,a){if(e&1&&m(0),e&2){let t=n(),i=t.row,o=t.column;c(" ",i[o]," ")}}function Pt(e,a){if(e&1&&F(0,Rt,2,3)(1,Et,2,3)(2,Bt,2,3)(3,Ft,2,3)(4,Mt,1,0,"button",4)(5,At,1,1),e&2){let t,i=a.c
1olumn,o=n();M((t=i)==="policyStatus"?0:t==="registrationStatus"?1:t==="sensorInfo"?2:t==="insuredType"?3:t===o.DataTableSpecialColumns.Actions?4:5)}}var Ce,Nt=w(()=>{f();H();tt();Ct();Tt();vt();st();J();W();bt();Lt();Dt();Ut();It();ut();_t();f();Ce=(()=>{class e{#e;#t;#i;constructor(){this.#e=s(U),this.#t=s(h),this.DataTableSpecialColumns=_,this.vm=this.#e.vm,this.#i=r(this.#t.upMd$),K([Q,et])}ngOnInit(){this.#e.init()}onRowClick(t){this.#i()?this.#e.openDetailsDialog(t):this.#e.navigateToDetails(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=R({type:e,selectors:[["admin-users-list"]],hostAttrs:[1,"d-flex","flex-column","gap-4"],features:[V([U])],decls:5,vars:8,consts:[["rowTemplate",""],["listView",""],["clickableRows","",3,"rowclick","items","columns","columnLabels","isLoading","emptyText","rowTemplate"],["adminUsersListRowTemplate",""],["uiButton","","variant","link","icon","arrow-right",1,"p-0"],["uiButton","","variant","link","icon","arrow-right",1,"p-0",3,"click"]],template:function(i,o){if(i&1){let u=y();P(0,"admin-users-search",1),T(1,"ui-data-table",2),l(2,"translate"),S("rowclick",function(dt){return x(u),C(o.onRowClick(dt))}),v(),B(3,Pt,6,1,"ng-template",3,0,j)}if(i&2){let u=N(4);k(),A("items",o.vm().users)("columns",o.vm().columns)("columnLabels",o.vm().columnLabels)("isLoading",o.vm().isLoading)("emptyText",p(2,6,"admin.users.no-results"))("rowTemplate",u)}},dependencies:[ot,X,rt,ft,G,nt,at,mt,ct],styles:[".table-wrapper[_ngcontent-%COMP%]{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-color:#00b6c3 transparent;scrollbar-width:thin}"],changeDetection:0})}}return e})()});Nt();export{Ce as UsersListComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.