import{c as V,h as w,i as D,k as B,m as E,n as N,y as A}from"./chunk-AUG6ZMIQ.js";import{a as O}from"./chunk-IQYEAILM.js";import"./chunk-3NZUMR4F.js";import{c as U}from"./chunk-JQJV7TYV.js";import{c as L,f as P}from"./chunk-YM543BQE.js";import{m as J,o as F,p as R}from"./chunk-STBSUBIU.js";import{Ac as _,Ba as v,Ca as C,Cb as j,Hb as c,Jc as r,Kc as a,Ob as y,Tb as n,Ub as o,Vb as l,Zb as I,_ as h,ac as x,fc as S,kb as i,lb as d,oc as M,qa as g,qc as u,rc as f,sc as T,xb as b}from"./chunk-NW2U37DI.js";import"./chunk-TWZW5B45.js";function k(m,q){m&1&&l(0,"i",17)}var se=(()=>{class m extends R{constructor(s,t,e,p){super(p),this.adminService=s,this.toastr=t,this.translate=e,this.sendingResponse={}}ngOnInit(){this.settingInprogress(),this.adminService.RefreshRquestAdmin$.pipe(h(this.unSubscribe$)).subscribe({next:()=>{this.settingInprogress()}})}settingInprogress(){this.loaderService.showLoader(),this.adminService.customcssjssetting().subscribe({next:s=>{this.response=s,this.loaderService.hideLoader()},error:()=>this.loaderService.hideLoader()})}ChangeTheValues(s,t){let e={customcss:s.customcss,customjs:s.customjs};this.sendingResponse[t]=!0,this.adminService.customcssjs(e).pipe(h(this.unSubscribe$)).subscribe({next:p=>{this.sendingResponse[t]=!1,this.toastr.success(this.translate.transform(p.success))},error:()=>{this.sendingResponse[t]=!1}})}static{this.\u0275fac=function(t){return new(t||m)(d(P),d(J),d(L),d(F))}}static{this.\u0275cmp=g({type:m,selectors:[["app-custom-css-js"]],standalone:!0,features:[b,_],decls:31,vars:23,consts:[["FormData","ngForm"],[3,"title"],[1,"col-xl-12","col-lg-12","col-md-12"],[1,"card"],[1,"card-header","border-0"],[1,"card-title"],[3,"ngSubmit"],[1,"card-body"],["type","hidden","name","id","Value","",1,"form-control"],[1,"col-sm-12","col-md-12"],[1,"form-group"],[1,"form-label"],["name","customcss","cols","30","rows","10",1,"form-control",3,"ngModel","placeholder"],["name","customjs","cols","30","rows","10",1,"form-control",3,"ngModel","placeholder"],[1,"col-md-12","card-footer"],[1,"form-group","float-end"],["type","submit",1,"btn","btn-secondary",3,"disabled"],[1,"fa","fa-spinner","fa-spin","mx-1"]],template:function(t,e){if(t&1){let p=I();l(0,"admin-page-header",1),n(1,"div",2)(2,"div",3)(3,"div",4)(4,"h4",5),u(5),r(6,"translate"),o()(),n(7,"form",6,0),x("ngSubmit",function(){v(p);let $=M(8);return C(e.ChangeTheValues($.value,"custommcssjs"))}),n(9,"div",7),l(10,"input",8),n(11,"div",9)(12,"div",10)(13,"label",11),u(14),r(15,"translate"),o(),l(16,"textarea",12),r(17,"translate"),o()(),n(18,"div",9)(19,"div",10)(20,"label",11),u(21),r(22,"translate"),o(),l(23,"textarea",13),r(24,"translate"),o()()(),n(25,"div",14)(26,"div",15)(27,"button",16),u(28),r(29,"translate"),j(30,k,1,0,"i",17),o()()()()()()}t&2&&(c("title","Custom CSS/JS"),i(5),f(a(6,11,"Custom CSS and JS")),i(9),f(a(15,13,"Custom CSS")),i(2),S("ngModel",e.response==null?null:e.response.CUSTOMCSS),c("placeholder",a(17,15,"Custom Css")),i(5),f(a(22,17,"Custom JS")),i(2),S("ngModel",e.response==null?null:e.response.CUSTOMJS),c("placeholder",a(24,19,"Custom Js")),i(4),c("disabled",e.sendingResponse.custommcssjs),i(),T("",a(29,21,"Save Changes")," "),i(2),y(e.sendingResponse.custommcssjs?30:-1))},dependencies:[O,U,A,N,V,w,D,E,B]})}}return m})();export{se as CustomCssJsComponent};
