1import{c as N,r as A,a as I,t as C,b as $}from"./text-edefc171.js";import{d as _,c as y,B as x,o as q,C as w,u as T,N as O,_ as v,a as n,b as o,e as a,x as i,F as p,f as Q,G as b,v as f,r as B,E as h,a9 as F}from"./index-367ef452.js";import{c as S,d as G,a as L}from"./General-c9a8aefc.js";import{_ as k}from"./tick-0fda386d.js";import"./moment-a9aaa855.js";const j=_({name:"agree-terms",setup(){O();const e=JSON.parse(localStorage.getItem("user")||"{}"),t=w(!1),r=T(),d=async()=>{window.location.href="/onboarding/add-on-questions",r.commit("SET_EARLY_ACCESS_STATE",{about_your_skin:!0})},m=()=>{const s=JSON.parse(localStorage.getItem("earlyAccessState")||"{}");delete s.about_your_skin,window.location.href="/onboarding/about-your-skin"},l=y(()=>r.getters.getSubmittedQuestionsAnswersData);return x(()=>l.value,s=>{t.value=!1}),q(()=>{console.log("hhhh"),t.value=!0,setTimeout(async()=>{await r.dispatch("GET_SUBMITTED_QUESTIONS",{user_answer_id:e.sessionId})},500)}),{navigateProducts:d,loading:t,answers:l,capitalizeFirstLetter:S,dateFormat:G,dateStringFormat:L,commaSeparatedString:s=>s.map(c=>S(c.answer_data.title)).join(", "),modifyAnswers:m}}}),D={key:0,class:"w-100 position-absolute top-50 start-50 translate-middle"},M={key:0,class:"card mt-5"},U={class:"card-body rounded-8 px-6"},z={class:"font-13 lh-17 fw-semibold text-grey--70 mb-1"},P={key:0},R={key:1},V={key:1,class:"font-14 lh-18 fw-bolder text-grey--100 mb-0"},Y={class:"d-flex align-center justify-content-between"};function J(e,t,r,d,m,l){var u;return n(),o(p,null,[e.loading?(n(),o("div",D,[...t[2]||(t[2]=[a("p",{class:"text-center font-15 lh-20 fw-bold text-grey--80 mb-6"},"Hang on, data loading...",-1)])])):i("",!0),e.loading?i("",!0):(n(),o(p,{key:1},[t[7]||(t[7]=Q('<div><p class="font-20 fw-bolder lh-26 text-grey--100">Do you agree to the following?</p></div><ul style="list-style:none;padding-left:0;"><li class="mb-4 d-flex"><img class="me-4" src="'+k+'"><span class="font-15 lh-20 fw-regular text-grey--70 mb-4">You will use the products as per the directions supplied on the packaging.</span></li><li class="d-flex"><img class="me-4" src="'+k+'"><span class="font-15 lh-20 fw-regular text-grey--70">You must inform both MiQuest and your GP if you experience any side effects, start a new medication or your medical status has changed.</span></li></ul>',2)),e.answers?(n(),o("div",M,[a("div",U,[t[4]||(t[4]=a("p",{class:"font-15 lh-20 fw-bold text-blue--100"},"Questionnaire Answers Summary",-1)),(n(!0),o(p,null,b((u=e.answers[0])==null?void 0:u.answer_details,s=>{var c;return n(),o("div",{key:s},[s.question?(n(),o(p,{key:0},[a("p",z,[a("span",null,"Q. "+f(e.capitalizeFirstLetter((c=s.question)==null?void 0:c.title)),1)]),s.answers.length>0?(n(),o(p,{key:0},[s.question.type!=="checkbox"?(n(!0),o(p,{key:0},b(s.answers,(g,E)=>(n(),o("p",{class:"font-14 lh-18 fw-bolder text-grey--100 mb-0",key:E},[g.answer_data&&Object.keys(g.answer_data).length>0?(n(),o("span",P,"A. "+f(e.capitalizeFirstLetter(g.answer_data.title)),1)):i("",!0),g.answer_data===null?(n(),o("span",R,f(e.capitalizeFirstLetter(g.answer)),1)):i("",!0)]))),128)):i("",!0),s.question.type==="checkbox"?(n(),o("p",V,[a("span",null,"A. "+f(e.commaSeparatedString(s.answers)),1)])):i("",!0)],64)):i("",!0)],64)):i("",!0),t[3]||(t[3]=a("hr",null,null,-1))])}),128))])])):i("",!0),a("div",Y,[a("button",{class:"mt-8 btn-lg w-100 height-49 btn btn-primary rounded-pill fw-bolder me-2",onClick:t[0]||(t[0]=(...s)=>e.modifyAnswers&&e.modifyAnswers(...s))},[...t[5]||(t[5]=[a("span",{class:"indicator-label"}," Modify Answers ",-1)])]),a("button",{class:"mt-8 btn-lg w-100 height-49 btn btn-primary rounded-pill fw-bolder",onClick:t[1]||(t[1]=(...s)=>e.navigateProducts&&e.navigateProducts(...s))},[...t[6]||(t[6]=[a("span",{class:"indicator-label"}," I Agree ",-1)])])])],64))],64)}const H=v(j,[["render",J]]),W=_({name:"user-noprogress",components:{checkbox:N,radio:A,radioText:I,agree:H,terminalNotification:C,text:$},setup(){const e=w({step:3,text:"Tell us about your skinâ¦"}),t=w({progressBar:!1}),r=T(),d=y(()=>r.getters.getCustomerSessionId),m=y(()=>r.getters.getSkinConditionQuestions);q(async()=>{await l()});const l=async()=>{await r.dispatch("GET_CUSTOMER_SESSION",{skin_condition:4}),setTimeout(async()=>{await s()},500)},u=async c=>{await r.dispatch("ANSWER_QUESTION",c),setTimeout(async()=>{await s()},500)},s=async()=>{await r.dispatch("GET_NEXT_QUESTION",{session_id:d.value})};return{prev:t,sessionId:d,navBarInfo:e,question:m,createAnswer:u,fetchNextQuestion:s,getSessionId:l}}}),X={class:"bg-surface--100 h-100"},K={class:"form--wrap"};function Z(e,t,r,d,m,l){const u=B("agree");return n(),o("div",X,[a("div",K,[e.question.question&&Object.keys(e.question.question).length>0?(n(),h(F(e.question.question.type),{key:0,notification:e.question.notification,question:e.question.question,sessionId:e.sessionId,onGetNext:e.fetchNextQuestion},null,40,["notification","question","sessionId","onGetNext"])):i("",!0),e.question.question&&Object.keys(e.question.question).length===0?(n(),h(u,{key:1})):i("",!0)])])}const ae=v(W,[["render",Z]]);
1export{ae 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.