1import{_ as C}from"./DAcvyqLR.js";import{a as N,c as B}from"./CPoKsqQW.js";import{d as E,z as F,u as P,i as q,r as w,W as z,c as A,b as e,t as r,y as D,e as n,m as a,p as M,n as O,o as S}from"./B57TYJqw.js";import{u as I}from"./CWxcd6Pt.js";import{s as W}from"./DbRth-gf.js";import{s as j}from"./DsTrJTTR.js";import{s as H}from"./Lfr_C_rq.js";import{a as G,E as J}from"./NMoJybSi.js";import{c as K,b as y,d as Q,u as X}from"./Dux5N9oh.js";import{T as Y}from"./S4IfXLcf.js";import{C as d}from"./CGTAsBBS.js";import"./9wNobjzG.js";import"./DFQqYzuY.js";import"./BwZEjQe2.js";import"./DQ43zFpA.js";import"./BA2HJqmI.js";const Z={class:"wrapContent registrering relative overflow-hidden"},ee={class:"wrapper xSmall relative z-20"},oe={class:"title text-center"},ae={class:"p-steppanel"},te={class:"styleH4 mb-8"},se={class:"block mb-2.5"},ne={class:"space-y-4"},ie={class:"flex items-center gap-3 leading-none cursor-pointer mb-4 md:m-0"},le={class:"font-normal block pb-0.5"},re={class:"flex items-center gap-3 leading-none cursor-pointer mb-4 md:m-0"},ce={class:"font-normal block pb-0.5"},me={class:"block mb-2.5 mt-9"},ue={class:"space-y-4"},de={class:"flex items-center gap-3 leading-none cursor-pointer mb-4 md:m-0"},pe={class:"font-normal block pb-0.5"},fe={class:"flex items-center gap-3 leading-none cursor-pointer mb-4 md:m-0"},ge={class:"font-normal block pb-0.5"},ve={class:"flex gap-2 mt-9"},be={class:"absolute z-10 w-full md:w-2/6 bottom-2.5 md:bottom-[50px] right-[-175px] md:right-[-1.5rem] flex gap-2 justify-end arrow-white"},Pe=E({__name:"editCommunication",setup(_e){const g=F(),v=N(),T=B(),{t:c}=P(),b=q(),{scrollToError:L}=X(),i=w(),p=w(!1),R=K({wantToReceiveNews:y(),wantToReceiveSatisfactionSurveys:y(),communicationLanguage:Q().oneOf([d.French,d.English],c("validation.required")).required(c("validation.required"))});i.value=v.user;const{handleSubmit:V,resetForm:$,meta:k,values:l}=G({validationSchema:R}),x=()=>{var o,t,m,u;$({values:{id:(o=i.value)==null?void 0:o.id,wantToReceiveNews:(t=i.value)==null?void 0:t.wantToReceiveNews,wantToReceiveSatisfactionSurveys:(m=i.value)==null?void 0:m.wantToReceiveSatisfactionSurveys,communicationLanguage:(u=i.value)==null?void 0:u.communicationLanguage}})},_=V(async o=>{p.value=!0;try{v.user=await I().updateProfileCommunication(o),T.add({severity:"success",summary:c("profile.confirm"),detail:c("profile.communicationUpdated"),life:Y}),g.push(b("profile"))}catch{p.value=!1}},async o=>{o&&await L()}),U=()=>{g.push(b("profile"))};return z(()=>{var o;(o=i==null?void 0:i.value)!=null&&o.id&&x()}),(o,t)=>{const m=H,u=j,h=W,f=C;return S(),A("div",Z,[e("div",ee,[e("div",oe,[e("h1",null,r(o.$t("completeProfile.modifyProfile")),1)]),e("form",{onSubmit:t[5]||(t[5]=D((...s)=>a(_)&&a(_)(...s),["prevent"]))},[e("div",ae,[e("h2",te,r(o.$t("completeProfile.stepThree")),1),e("label",se,r(o.$t("profile.communicationLanguageLabel")),1),e("div",ne,[e("label",ie,[n(m,{modelValue:a(l).communicationLanguage,"onUpdate:modelValue":t[0]||(t[0]=s=>a(l).communicationLanguage=s),name:"communicationLanguage",value:a(d).French},null,8,["modelValue","value"]),e("span",le,r(o.$t("communicationLanguage.French")),1)]),e("label",re,[n(m,{modelValue:a(l).communicationLanguage,"onUpdate:modelValue":t[1]||(t[1]=s=>a(l).communicationLanguage=s),name:"communicationLanguage",value:a(d).English},null,8,["modelValue","value"]),e("span",ce,r(o.$t("communicationLanguage.English")),1)]),a(k).touched?(S(),M(a(J),{key:0,name:"communicationLanguage",class:"text-red-500",as:"small"})):O("",!0)]),e("label",me,r(o.$t("profile.agreeToRecive")),1),e("div",ue,[e("label",de,[n(u,{modelValue:a(l).wantToReceiveNews,"onUpdate:modelValue":t[2]||(t[2]=s=>a(l).wantToReceiveNews=s),name:"wantToReceiveNews",binary:!0},null,8,["modelValue"]),e("span",pe,r(o.$t("profile.news")),1)]),e("label",fe,[n(u,{modelValue:a(l).wantToReceiveSatisfactionSurveys,"onUpdate:modelValue":t[3]||(t[3]=s=>a(l).wantToReceiveSatisfactionSurveys=s),name:"wantToReceiveSatisfactionSurveys",binary:!0},null,8,["modelValue"]),e("span",ge,r(o.$t("profile.satisfactionSurveys")),1)])]),e("div",ve,[n(
1h,{label:a(c)("profile.save"),type:"submit",class:"btn",disabled:a(p)},null,8,["label","disabled"]),n(h,{label:a(c)("profile.cancel"),outlined:"",onClick:t[4]||(t[4]=s=>U()),class:"btn btn_outline"},null,8,["label"])])])],32)]),e("div",be,[n(f,{class:"h-auto md:w-[70px] lg:h-full"}),n(f,{class:"h-auto md:w-[70px] lg:h-full"}),n(f,{class:"h-auto md:w-[70px] lg:h-full"})])])}}});export{Pe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.