import{_ as w,c as u,o as n,w as o,a,h as f,b as s,t as i,j as $,d as v,n as k,e as c}from"./index-D02r7Zsc.js";import{_ as I}from"./BContainer.vue_vue_type_script_setup_true_lang-Bi1hGl0B-Bd4Gid1V.js";import{_ as V}from"./BForm.vue_vue_type_script_setup_true_lang-u44ElAm9-BpNSPhCc.js";import{_ as C}from"./BAlert.vue_vue_type_script_setup_true_lang-BoLIpZFk-cCJ5v_dt.js";import{_ as P}from"./BButton.vue_vue_type_script_setup_true_lang-D5Eg7-Zv-DDRCX2AG.js";import{_ as B,a as z}from"./BInputGroupText.vue_vue_type_script_setup_true_lang-BBN5F0A4-C_He_f8L.js";import{_ as L}from"./BFormInput.vue_vue_type_script_setup_true_lang-B9E5yJEs-DBdCBfsp.js";import{_ as N}from"./BImg.vue_vue_type_script_setup_true_lang-BJeFN9OT-6jJZkpT2.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./BLink.vue_vue_type_script_setup_true_lang-Ct47WhzE-DDPYis_D.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./stringUtils-gJJ6T6UC-g5BZrMym.js";import"./BCloseButton.vue_vue_type_script_setup_true_lang-byZmQ_ot-CWP55Z5N.js";import"./BProgress.vue_vue_type_script_setup_true_lang-DDTA5_ZV-eRxVOfNj.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./useId-t29UARy6-BH5d2231.js";import"./useShowHide-717t6y_D-BZTBbOpd.js";import"./classes-BW_GpXTu-AKwVND4h.js";import"./BSpinner.vue_vue_type_script_setup_true_lang-H1MzHypA-D8AXjJB0.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";import"./useStateClass-BGbSLWFN-BcKQ8Z3i.js";import"./useRadiusElementClasses-DtKYQuWz-DKKObN9q.js";const q={data:function(){return{userInfos:{login:"",password:"",sessionId:""},alert:!1,hidePassword:!0}},methods:{async submit(){this.publish("showOverlay",!0),this.alert=!1,await this.getModule("start").login(this.userInfos.login,this.userInfos.password)?this.connection():(this.alert=!0,this.publish("showOverlay",!1))},async connection(){if(await this.getModule("start").setData(this.get("sessionId")),!localStorage.getItem("onboarding")){this.publish("showOverlay",!1),this.$router.push({name:"onboarding"});return}this.$router.push({name:"home"})}}},M={class:"text-center text-secondary pt-5 mb-2 title h2 fs-2"},O={class:"h4 my-3 fst-italic text-center my-3"},S={key:0,class:"text-center"},D=["href"],T={class:"d-flex"};function U(e,t,j,A,E,h){const _=N,l=z,m=L,d=B,p=P,g=C,b=V,y=I;return n(),u(y,{class:"bg-light vh-100 vw-100"},{default:o(()=>[a("h1",M,i(e.$t("menusLabels.start.full")),1),e.getConfig().logoLibrary?(n(),u(_,{key:0,alt:e.$t("login.libraryLogoAlt"),thumbnail:"",height:"100",width:"100",rounded:"",fluid:"",src:e.getConfig().logoLibrary,class:"d-block mx-auto"},null,8,["alt","src"])):f("",!0),a("h2",O,i(e.$t("login.pleaseConnect")),1),s(b,{onSubmit:t[3]||(t[3]=$(r=>h.submit(),["prevent"])),class:"px-3"},{default:o(()=>[s(d,{class:"my-3"},{prepend:o(()=>[s(l,null,{default:o(()=>[...t[4]||(t[4]=[a("i",{class:"bi bi-person text-primary","aria-hidden":"true",style:{"font-size":"125%"}},null,-1)])]),_:1})]),default:o(()=>[s(m,{required:"",modelValue:e.userInfos.login,"onUpdate:modelValue":t[0]||(t[0]=r=>e.userInfos.login=r),type:"text",placeholder:e.$t("login.loginPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),s(d,{class:"my-3"},{prepend:o(()=>[s(l,null,{default:o(()=>[...t[5]||(t[5]=[a("i",{class:"bi bi-lock text-primary","aria-hidden":"true",style:{"font-size":"125%"}},null,-1)])]),_:1})]),append:o(()=>[s(p,{"aria-label":"afficher ou masquer le mot de passe",size:"sm",variant:"outline-dark",onClick:t[2]||(t[2]=r=>e.hidePassword=!e.hidePassword)},{default:o(()=>[a("i",{class:k(e.hidePassword?"bi bi-eye-fill":"bi bi-eye-slash-fill"),"aria-hidden":"true",style:{"font-size":"125%"}},null,2)]),_:1})]),default:o(()=>[s(m,{required:"",modelValue:e.userInfos.password,"onUpdate:modelValue":t[1]||(t[1]=r=>e.userInfos.password=r),type:e.hidePassword?"password":"text",placeholder:e.$t("login.passwordPlaceholder")},null,8,["modelValue","type","placeholder"])]),_:1}),s(g,{class:"mx-2",variant:"danger",show:e.alert},{default:o(()=>[c(i(e.$t("login.errorText")),1)]),_:1},8,["show"]),e.getConfig().opac_password_forgotten_show>0?(n(),v("div",S,[a("a",{href:e.getConfig().applimobile_opac_url+"askmdp.php",target:"_blank"},i(e.$t("login.forgotPassword")),9,D)])):f("",!0),a("div",T,[s(p,{pill:"",class:"ms-auto my-3",variant:"outline-primary",type:"submit"},{default:o(()=>[c(i(e.$t("login.connectButton")),1)]),_:1})])]),_:1})]),_:1})}const pe=w(q,[["render",U]]);export{pe as default};
