import{a as J}from"./chunk-BQ3BB54V.js";import{a as Y,b as z}from"./chunk-M52HGFOU.js";import"./chunk-5FPIC42W.js";import{c as w,h as A,i as D,k as j,m as F,n as q,t as U,y as $}from"./chunk-AUG6ZMIQ.js";import{a as O}from"./chunk-IQYEAILM.js";import"./chunk-3NZUMR4F.js";import{c as H}from"./chunk-JQJV7TYV.js";import{c as k,f as G}from"./chunk-YM543BQE.js";import{m as V,o as B,p as N}from"./chunk-STBSUBIU.js";import{Ac as I,Ba as x,Ca as R,Cb as b,Hb as u,Jb as _,Jc as p,Kc as m,Ob as S,Tb as a,Ub as l,Vb as f,Zb as T,_ as h,ac as y,cc as M,kb as i,lb as c,oc as v,qa as E,qc as d,rc as L,sc as g,uc as P,xb as C}from"./chunk-NW2U37DI.js";import"./chunk-TWZW5B45.js";function W(o,K){if(o&1&&(a(0,"div",14),d(1),p(2,"translate"),l()),o&2){M();let r=v(22);i(),P(" ",r.errors==null?null:r.errors.maxLength.actualLength,"/",r.errors==null?null:r.errors.maxLength.maxLength," ",m(2,3," exceeded the limit")," ")}}function X(o,K){o&1&&f(0,"i",18)}var ve=(()=>{class o extends N{constructor(r,t,e,n){super(n),this.adminService=r,this.Toastr=t,this.translate=e,this.sendingResponse={},this.toolbar=J,this.loaderService.showLoader(),this.adminService.error404().pipe(h(this.unSubscribe$)).subscribe({next:s=>{this.erroRes=s,this.loaderService.hideLoader()},error:()=>this.loaderService.hideLoader()}),this.toolbar.placeholder=this.translate.transform("Enter Your Text...")}ngOnInit(){}editError404(r,t){if(r.valid){this.sendingResponse[t]=!0;let e={"404subtitle":r.value["404subtitle"],"404title":r.value["404title"]};this.adminService.error404Edit(e).pipe(h(this.unSubscribe$)).subscribe({next:n=>{this.sendingResponse[t]=!1,n.success&&this.Toastr.success(this.translate.transform(n.success)),n.error&&this.Toastr.error(this.translate.transform(n.error.error.message))},error:()=>{this.sendingResponse[t]=!1}})}}static{this.\u0275fac=function(t){return new(t||o)(c(G),c(V),c(k),c(B))}}static{this.\u0275cmp=E({type:o,selectors:[["app-error404-page"]],standalone:!0,features:[C,I],decls:31,vars:25,consts:[["error404","ngForm"],["description","ngModel"],[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"],[1,"form-group"],[1,"form-label"],[1,"text-red"],["required","","type","text","name","404title",1,"form-control",3,"value","ngModel"],["name","404subtitle",1,"form-control",3,"config","ngModel","placeholder"],[1,"limit-error"],[1,"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 n=T();f(0,"admin-page-header",2),a(1,"div",3)(2,"div",4)(3,"div",5)(4,"h4",6),d(5),p(6,"translate"),l()(),a(7,"form",7,0),y("ngSubmit",function(){x(n);let Q=v(8);return R(e.editError404(Q,"error404"))}),a(9,"div",8)(10,"div",9)(11,"label",10),d(12),p(13,"translate"),a(14,"span",11),d(15,"*"),l()(),f(16,"input",12),l(),a(17,"div",9)(18,"label",10),d(19),p(20,"translate"),l(),f(21,"angular-editor",13,1),p(23,"translate"),b(24,W,3,5,"div",14),l()(),a(25,"div",15)(26,"div",16)(27,"button",17),d(28),p(29,"translate"),b(30,X,1,0,"i",18),l()()()()()()}if(t&2){let n=v(8),s=v(22);u("title","Error 404"),i(5),L(m(6,15,"404 Error Page")),i(7),g("",m(13,17,"Title")," "),i(4),u("value",e.erroRes==null||e.erroRes[0]==null?null:e.erroRes[0].errorvalue)("ngModel",e.erroRes==null||e.erroRes[0]==null?null:e.erroRes[0].errorvalue),i(3),g("",m(20,19,"Subtitle")," "),i(2),_("is-invalid",s.invalid&&s.touched),u("config",e.toolbar)("ngModel",e.erroRes==null||e.erroRes[1]==null?null:e.erroRes[1].errorvalue)("placeholder",m(23,21,"Enter text here")),i(3),S(s.errors!=null&&s.errors.maxLength?24:-1),i(3),u("disabled",n.invalid||e.sendingResponse.error404),i(),g("",m(29,23,"Save Changes")," "),i(2),S(e.sendingResponse.error404?30:-1)}},dependencies:[O,H,z,Y,$,q,w,A,D,U,F,j]})}}return o})();export{ve as Error404PageComponent};
