"use strict";(self.webpackChunksalon_web=self.webpackChunksalon_web||[]).push([[774],{7774:(w,m,o)=>{o.r(m),o.d(m,{ContactModule:()=>y});var g=o(6895),u=o(4553),d=o(5439),h=o(5226),p=o.n(h),t=o(4650),f=o(7241),C=o(5830),r=o(7890),c=o(4006);const M=[{path:"",component:(()=>{class n{constructor(a,e){this.util=a,this.api=e,this.contact={name:"",email:"",message:"",status:"0",date:d().format("YYYY-MM-DD")},console.log("general",this.util.general)}ngOnInit(){}submit(){return console.log("contact",this.contact),""==this.contact.name||""==this.contact.email||""==this.contact.message?(this.util.errorMessage(this.util.translate("all fields are required")),!1):/^[\w._-]+[+]?[\w._-]+@[\w.-]+\.[a-zA-Z]{2,6}$/.test(this.contact.email)?(this.util.start(),void this.api.post("v1/contacts/create",this.contact).then(e=>{if(this.util.stop(),e&&e.status&&200==e.status&&e.data){const l={id:e.data.id,mediaURL:this.api.mediaURL,subject:this.util.translate("New Mail Request Received"),thank_you_text:this.util.translate("You have received new mail"),header_text:this.util.translate("New Contact Details"),email:this.util.general.email,from_mail:this.contact.email,from_username:this.contact.name,from_message:this.contact.message,to_respond:this.util.translate("We have received your request, we will respond on your issue soon")};console.log(l),this.api.post("v1/sendMailToAdmin",l).then(s=>{console.log(s)},s=>{console.log(s)}),this.contact.email="",this.contact.name="",this.contact.message="",e&&200==e.status?this.success():this.util.errorMessage(this.util.translate("Something went wrong"))}},e=>{console.log(e),this.util.stop(),this.util.errorMessage(this.util.translate("Something went wrong"))})):(this.util.errorMessage(this.util.translate("Please enter valid email")),!1)}success(){p().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({icon:"success",title:this.util.translate("message sent successfully")})}}return n.\u0275fac=function(a){return new(a||n)(t.Y36(f.f),t.Y36(C.s))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-contact"]],decls:13,vars:8,consts:[[1,"container"],[1,"head_title"],[1,"row"],[1,"col-lg-6"],["type","text",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["rows","5",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["type","button","mdbWavesEffect","","mdbBtn","",1,"btn",3,"click"],[1,"image-container"],["src","../../../assets/imgs/5.avif","alt","Contact Image"]],template:function(a,e){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"label"),t._uU(3),t.qZA()(),t.TgZ(4,"div",2)(5,"div",3)(6,"input",4),t.NdJ("ngModelChange",function(s){return e.contact.name=s}),t.qZA(),t.TgZ(7,"input",4),t.NdJ("ngModelChange",function(s){return e.contact.email=s}),t.qZA(),t.TgZ(8,"textarea",5),t.NdJ("ngModelChange",function(s){return e.contact.message=s}),t.qZA(),t.TgZ(9,"button",6),t.NdJ("click",function(){return e.submit()}),t._uU(10),t.qZA()(),t.TgZ(11,"div",7),t._UZ(12,"img",8),t.qZA()()()),2&a&&(t.xp6(3),t.Oqu(e.util.translate("Contact Us")),t.xp6(3),t.Q6J("ngModel",e.contact.name)("placeholder",e.util.translate("Full Name")),t.xp6(1),t.Q6J("ngModel",e.contact.email)("placeholder",e.util.translate("Email ID")),t.xp6(1),t.Q6J("ngModel",e.contact.message)("placeholder",e.util.translate("Write Message..")),t.xp6(2),t.Oqu(e.util.translate("Submit")))},dependencies:[r.mT,r.b6,c.Fj,c.JJ,c.On],styles:['@charset "UTF-8";label[_ngcontent-%COMP%]{display:block}.head_title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid lightgray;margin-bottom:15px;width:100%}.head_title[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-family:bold;font-size:26px;text-transform:capitalize;margin:0}.row[_ngcontent-%COMP%]{margin-top:50px;margin-bottom:50px}input[_ngcontent-%COMP%]{margin-bottom:15px}.btn[_ngcontent-%COMP%]{background:#0b19df;border-radius:25px;color:#fff;width:100px;margin-top:30px;width:160px}.image-container[_ngcontent-%COMP%]{flex:1;display:flex;justify-content:center;align-items:center}.image-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;border-radius:8px}']}),n})()}];let v=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[u.Bz.forChild(M),u.Bz]}),n})();var b=o(4466);let y=(()=>{class n{}return n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[g.ez,v,r.yi.forRoot(),b.m]}),n})()}}]);