import{b as g,A as x,B as R,j as p,o as r,m as q,c as i,w as o,k as t,l as c,t as n,u as e,F as C,C as N,e as l,n as B,g as m,r as I,h as $}from"./runtime-dom.esm-bundler-CnPoR0UW.chunk.mjs";import{b as z}from"./index-DqIuD5e7.chunk.mjs";import{l as A,a as E}from"./index-BgmsSgl5.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-DFt3Gk_P.chunk.mjs";import{N as w}from"./logger-D3RVzcfQ-v2acROFG.chunk.mjs";/* empty css                                       */import{_ as L}from"./createElementId-DhjFt1I9-Cdw8hg_s.chunk.mjs";import{N as _}from"./NcNoteCard-CWiO3Dse-DuB9YE1o.chunk.mjs";import{N as f}from"./NcPasswordField-BOLzDHBJ-GBwBvLv5.chunk.mjs";import"./index-DaEUtA7I.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./TrashCanOutline-DGTAXxb4.chunk.mjs";const T={id:"guest-content-vue"},U=g({__name:"NcGuestContent",setup(y){return x(()=>{document.getElementById("content").classList.add("nc-guest-content")}),R(()=>{document.getElementById("content").classList.remove("nc-guest-content")}),(a,u)=>(r(),p("div",T,[q(a.$slots,"default",{},void 0,!0)]))}}),j=L(U,[["__scopeId","data-v-26ad2498"]]),F=["action"],G=["value"],M=["value"],S=g({__name:"RenewPassword",setup(y){const a=A("user_ldap","renewPasswordParameters"),u=a.errors.includes("invalidpassword"),v=z(),d=I(!1);function h(){d.value=!0}return(P,O)=>(r(),i(e(j),null,{default:o(()=>[t("h2",null,n(e(s)("user_ldap","Please renew your password")),1),e(a).messages.length?(r(),i(e(_),{key:0,type:"warning"},{default:o(()=>[(r(!0),p(C,null,N(e(a).messages,(b,k)=>(r(),p("p",{key:k},n(b),1))),128))]),_:1})):c("",!0),e(a).errors.includes("internalexception")?(r(),i(e(_),{key:1,heading:e(s)("user_ldap","An internal error occurred."),text:e(s)("user_ldap","Please try again or contact your administrator."),type:"warning"},null,8,["heading","text"])):c("",!0),t("form",{method:"post",name:"renewpassword",action:e(a).tryRenewPasswordUrl,onSubmit:h},[l(e(f),{autofocus:"",autocomplete:"off",autocapitalize:"off",error:e(u),helperText:e(u)?e(s)("user_ldap","Wrong password."):"",label:e(s)("user_ldap","Current password"),required:"",spellcheck:"false",name:"oldPassword"},null,8,["error","helperText","label"]),l(e(f),{autofocus:"",autocomplete:"off",autocapitalize:"off",label:e(s)("user_ldap","New password"),required:"",spellcheck:"false",name:"newPassword"},null,8,["label"]),t("div",{class:B(P.$style.renewPassword__actions)},[l(e(w),{href:e(a).cancelRenewUrl,variant:"error"},{default:o(()=>[m(n(e(s)("user_ldap","Cancel")),1)]),_:1},8,["href"]),l(e(w),{disabled:d.value,type:"submit",variant:"primary"},{default:o(()=>[m(n(d.value?e(s)("user_ldap","Renewing…"):e(s)("user_ldap","Renew password")),1)]),_:1},8,["disabled"])],2),t("input",{type:"hidden",name:"user",value:e(a).user},null,8,G),t("input",{type:"hidden",name:"requesttoken",value:e(v)},null,8,M)],40,F)]),_:1}))}}),W="_renewPassword__actions_1bcqw_2",D={renewPassword__actions:W},H={$style:D},J=E(S,[["__cssModules",H]]),K=$(J);K.mount("#user_ldap-renewPassword");
//# sourceMappingURL=user_ldap-renewPassword.mjs.map
