"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[176],{1176:(F,u,o)=>{o.r(u),o.d(u,{AuthModule:()=>c});var n=o(177),s=o(9417),t=o(8699),d=o(5471),m=o(8185),h=o(7110);function p(e,k){1&e&&t.nrm(0,"span",32)}function b(e,k){1&e&&(t.j41(0,"span"),t.EFF(1," Masuk "),t.k0s())}const f=[{path:"",component:(()=>{class e{constructor(a,i,r,l,g){this.formBuilder=a,this.auth=i,this.activatedRoute=r,this.router=l,this.helpers=g,this.isShowPassword=!1,this.isFormSubmitted=!1,this.redirectUrl="",this.form=this.formBuilder.group({username:[null,[s.k0.required]],password:[null,[s.k0.required]],remember_me:[!1]}),this.redirectUrl=this.activatedRoute.snapshot.queryParams.url}onSubmit(){this.form.valid&&(this.isFormSubmitted=!0,this.auth.login(this.form.value).subscribe({next:({data:a})=>{this.isFormSubmitted=!1,this.auth.setToken(a.token),this.auth.setJwtToken(a.jwtToken),this.router.navigate([this.redirectUrl??"/dashboard"])},error:a=>{this.isFormSubmitted=!1,this.helpers.toast("error","Username atau Password salah!")}}))}static{this.\u0275fac=function(i){return new(i||e)(t.rXU(s.ok),t.rXU(d.u),t.rXU(m.nX),t.rXU(m.Ix),t.rXU(h.V))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["app-auth"]],hostAttrs:[1,"flex-fill"],decls:46,vars:6,consts:[[1,"row","h-100","mx-0"],[1,"col-lg-7","d-none","d-lg-block","bg-primary","p-5","text-white","position-relative","overflow-hidden"],[1,"position-relative","z-1"],["src","assets/images/batu_city_logo.png","alt","",1,"img-fluid","mb-4","pe-none"],[1,"display-1","mb-4","fw-bold"],[1,"h5","mb-0","fw-medium"],["src","assets/images/login_accent.png","alt","",1,"position-absolute","bottom-0","z-0","pe-none",2,"right","-1.75rem"],[1,"col-lg-5","py-5"],[1,"h-100","d-flex","flex-column","align-items-center"],[1,"mx-auto","mt-auto","mb-3","pt-3",2,"width","min(100%, 380px)"],[1,"text-center","mb-5"],[1,"h4","fw-semibold","mb-2"],[1,"mb-0","text-body-tertiary"],[1,"p-4","border","rounded-3",2,"box-shadow","6px 38px 48px 0px rgba(0, 0, 0, 0.08)"],[1,"fw-semibold","text-center","mb-4"],[3,"formGroup","ngSubmit"],[1,"mb-3"],["for","username",1,"form-label"],["type","text","id","username","formControlName","username","placeholder","Masukan E-mail/Username","autocomplete","username",1,"form-control"],["for","password",1,"form-label"],[1,"input-group"],["id","password","formControlName","password","placeholder","Masukan Kata Sandi","autocomplete","off",1,"form-control",3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"bi",3,"ngClass"],[1,"form-check","mb-3","d-flex","justify-content-between"],[1,"rememberMe-group"],["type","checkbox","id","rememberMe","formControlName","remember_me","autocomplete","off",1,"form-check-input"],["for","rememberMe",1,"form-check-label"],["type","submit",1,"btn","btn-primary","d-block","w-100","btn-lg",3,"disabled"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],[4,"ngIf"],[1,"text-center","small","text-body-tertiary","mb-0","mt-auto"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(i,r){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.nrm(3,"img",3),t.j41(4,"h1",4),t.EFF(5,"Road"),t.nrm(6,"br"),t.EFF(7,"Report"),t.k0s(),t.j41(8,"h2",5),t.EFF(9," Sistem Pelaporan Kerusakan Lokasi"),t.nrm(10,"br"),t.EFF(11,"Dinas PUPR Kota Batu "),t.k0s()(),t.nrm(12,"img",6),t.k0s(),t.j41(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"h1",11),t.EFF(18,"Selamat Datang"),t.k0s(),t.j41(19,"p",12),t.EFF(20," Masukan username dan kata sandi anda untuk masuk ke dalam dashboard "),t.k0s()(),t.j41(21,"div",13)(22,"h5",14),t.EFF(23,"Masuk"),t.k0s(),t.j41(24,"form",15),t.bIt("ngSubmit",function(){return r.onSubmit()}),t.j41(25,"div",16)(26,"label",17),t.EFF(27,"Email/Username"),t.k0s(),t.nrm(28,"input",18),t.k0s(),t.j41(29,"div",16)(30,"label",19),t.EFF(31,"Password"),t.k0s(),t.j41(32,"div",20),t.nrm(33,"input",21),t.j41(34,"button",22),t.bIt("click",function(){return r.isShowPassword=!r.isShowPassword}),t.nrm(35,"i",23),t.k0s()()(),t.j41(36,"div",24)(37,"div",25),t.nrm(38,"input",26),t.j41(39,"label",27),t.EFF(40," Ingat saya "),t.k0s()()(),t.j41(41,"button",28),t.DNE(42,p,1,0,"span",29),t.DNE(43,b,2,0,"span",30),t.k0s()()()(),t.j41(44,"p",31),t.EFF(45," \xa9 All Right Reversed by Dinas PUPR Kota Batu "),t.k0s()()()()),2&i&&(t.R7$(24),t.Y8G("formGroup",r.form),t.R7$(9),t.Y8G("type",r.isShowPassword?"text":"password"),t.R7$(2),t.Y8G("ngClass",r.isShowPassword?"bi-eye-slash":"bi-eye"),t.R7$(6),t.Y8G("disabled",r.form.invalid||r.isFormSubmitted),t.R7$(1),t.Y8G("ngIf",r.isFormSubmitted),t.R7$(1),t.Y8G("ngIf",!r.isFormSubmitted))},dependencies:[n.YU,n.bT,s.qT,s.me,s.Zm,s.BC,s.cb,s.j4,s.JD]})}}return e})()}];let c=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=t.$C({type:e})}static{this.\u0275inj=t.G2t({imports:[n.MD,m.iI.forChild(f),s.X1]})}}return e})()}}]);