import{a as z}from"./chunk-FQHZHINT.js";import"./chunk-T5RX4JLB.js";import"./chunk-EFYIWIC7.js";import"./chunk-NTJK7BYQ.js";import"./chunk-DM34UTHR.js";import"./chunk-QUDAER4J.js";import"./chunk-XZELSHJP.js";import{v as C}from"./chunk-UWZSUJ2E.js";import{y}from"./chunk-AUG6ZMIQ.js";import{a as I}from"./chunk-IQYEAILM.js";import"./chunk-3NZUMR4F.js";import{c as _}from"./chunk-JQJV7TYV.js";import{c as D,f as F}from"./chunk-YM543BQE.js";import{o as S,p as g}from"./chunk-STBSUBIU.js";import{Ac as k,Hb as n,Jc as T,Kc as b,Tb as l,Ub as d,Vb as h,_ as r,ac as u,kb as o,lb as s,qa as c,qc as v,rc as f,xb as p}from"./chunk-NW2U37DI.js";import"./chunk-TWZW5B45.js";var U=(()=>{class a extends g{constructor(e,i,t,m){super(m),this.adminService=e,this.modalService=i,this.translate=t,this.displayedColumns=["id","select","ticketdetails","user","status","assignto","actions"],this.isloader=!0}ngOnInit(){this.allticketsFn(),this.adminService.RefreshRquestAdmin$.pipe(r(this.unSubscribe$)).subscribe({next:()=>this.allticketsFn()})}allticketsFn(){this.isloader=!0,this.loaderService.showLoader(),this.alltickets$=this.adminService.alltickets(1,10,"").pipe(r(this.unSubscribe$)).subscribe({next:e=>{this.timezone=e?.timezonedata,this.permission=e.permissions,this.activeTickets=e.queryList,this.isloader=!1,this.setting=e.setting?.original,this.permission?.includes("Ticket Delete")||(this.displayedColumns=["id","ticketdetails","user","status","assignto","actions"]),this.loaderService.hideLoader()},error:()=>{this.isloader=!0,this.loaderService.hideLoader()}})}loadData(e){this.isloader=!0,this.adminService.alltickets(e.page,e.size,e.filter).subscribe({next:i=>{this.isloader=!1,this.activeTickets=i.queryList},error:i=>this.isloader=!1})}ngOnDestroy(){this.modalService?.dismissAll()}static{this.\u0275fac=function(i){return new(i||a)(s(F),s(C),s(D),s(S))}}static{this.\u0275cmp=c({type:a,selectors:[["app-total-tickets"]],standalone:!0,features:[p,k],decls:10,vars:9,consts:[[3,"title"],[1,"row","row-sm"],[1,"col-lg-12"],[1,"card"],[1,"card-header","border-0"],[1,"card-title"],[1,"card-body"],[3,"loadDataFn","isloader","tableData","permission","timezone","displayedColumns"]],template:function(i,t){i&1&&(h(0,"admin-page-header",0),l(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"h4",5),v(6),T(7,"translate"),d()(),l(8,"div",6)(9,"app-admin-ticket-table",7),u("loadDataFn",function(L){return t.loadData(L)}),d()()()()()),i&2&&(n("title","Total Tickets"),o(6),f(b(7,7,"Total Tickets")),o(3),n("isloader",t.isloader)("tableData",t.activeTickets)("permission",t.permission)("timezone",t.timezone)("displayedColumns",t.displayedColumns))},dependencies:[I,_,y,z]})}}return a})();export{U as TotalTicketsComponent};
