import{_ as f}from"./index-CwP5gtrp-D2vs7vDd.js";import{_ as h}from"./BButton.vue_vue_type_script_setup_true_lang-D5Eg7-Zv-DDRCX2AG.js";import{_ as g}from"./BImg.vue_vue_type_script_setup_true_lang-BJeFN9OT-6jJZkpT2.js";import{_ as w,d as c,o as m,a,c as b,h as v,b as r,t as o,w as l,e as s}from"./index-D02r7Zsc.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./getElement-DrDVR-jO-jZgQ3Xxs.js";import"./BCloseButton.vue_vue_type_script_setup_true_lang-byZmQ_ot-CWP55Z5N.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./useId-t29UARy6-BH5d2231.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.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"./BLink.vue_vue_type_script_setup_true_lang-Ct47WhzE-DDPYis_D.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./stringUtils-gJJ6T6UC-g5BZrMym.js";import"./useRadiusElementClasses-DtKYQuWz-DKKObN9q.js";const $={data:function(){return{showPwaModal:!1,hasNavigated:!1}},mounted:function(){this.subscribe("ws_ready",()=>this.selectRoute()),setTimeout(()=>{this.hasNavigated||(console.warn("ws_ready timeout, forcing navigation"),this.selectRoute())},5e3)},methods:{async startCalls(){if(await this.getModule("start").login()===!0){this.$router.push({name:"home"});return}if(this.getConfig().applimobile_external_auth_active==1&&await this.getModule("start").checkExtAuth()===!0){this.$router.push({name:"login_ext"});return}this.$router.push({name:"login"})},selectRoute(){if(this.hasNavigated=!0,JSON.parse(localStorage.getItem("noLongerWarn"))){this.startCalls();return}if(window.matchMedia("(display-mode: standalone)").matches===!1||window.navigator.standalone===!1){this.showPwaModal=!0;return}this.startCalls()},hidePwaInstallModal(t=!1){this.showPwaModal=!1,t&&localStorage.setItem("noLongerWarn",!0),this.startCalls()}}},y={class:"bg-light p-2 vh-100 vw-100 d-flex flex-column align-items-center"},M={class:"text-center text-secondary h1 mt-5 mb-4 title",style:{"font-size":"2.5rem"}},C={class:"text-light title"},I={class:"text-justify"};function k(t,e,_,N,B,n){const u=g,d=h,p=f;return m(),c("div",y,[a("h1",M,o(t.$t("menusLabels.start.full")),1),t.getConfig().logoLibrary?(m(),b(u,{key:0,alt:t.$t("load.libraryLogoAlt"),thumbnail:"",height:"100",width:"100",rounded:"",fluid:"",src:t.getConfig().logoLibrary},null,8,["alt","src"])):v("",!0),e[7]||(e[7]=a("div",{class:"position-relative d-inline-block",style:{width:"5rem",height:"5rem"}},[a("i",{class:"bi bi-book text-primary position-absolute top-0 start-0",style:{"font-size":"5rem"}}),a("i",{class:"bi bi-bookmark-fill text-info position-absolute icon-fade-loop",style:{"font-size":"1.5rem",top:"0.8rem",left:"3.2rem"}})],-1)),r(p,{modelValue:t.showPwaModal,"onUpdate:modelValue":e[2]||(e[2]=i=>t.showPwaModal=i),centered:"","no-close-on-backdrop":"","hide-header-close":"","header-bg-variant":"info"},{header:l(()=>[a("div",C,o(t.$t("load.pwaInstallTitle")),1)]),footer:l(()=>[r(d,{variant:"outline-danger",class:"me-auto",onClick:e[0]||(e[0]=i=>n.hidePwaInstallModal(!0))},{default:l(()=>[...e[6]||(e[6]=[s(" Ne plus m'avertir ",-1)])]),_:1}),r(d,{variant:"outline-primary",class:"ms-auto",onClick:e[1]||(e[1]=i=>n.hidePwaInstallModal())},{default:l(()=>[s(o(t.$t("load.pwaInstallButton")),1)]),_:1})]),default:l(()=>[a("div",I,[s(o(t.$t("load.pwaInstallMessage1"))+" ",1),e[3]||(e[3]=a("hr",null,null,-1)),s(" "+o(t.$t("load.pwaInstallMessage2"))+" ",1),e[4]||(e[4]=a("i",{class:"bi bi-three-dots-vertical",style:{"font-size":"1.3rem"}},null,-1)),s(" "+o(t.$t("load.pwaInstallMessage3"))+' "',1),a("i",null,o(t.$t("load.pwaInstallCaption1")),1),s('" '+o(t.$t("load.pwaInstallMessage4"))+' "',1),a("i",null,o(t.$t("load.pwaInstallCaption2")),1),e[5]||(e[5]=s('". ',-1))])]),_:1},8,["modelValue"])])}const G=w($,[["render",k]]);export{G as default};
