1import{d as E}from"./pz53iXqy.js";import{_ as I,a as J}from"./BSNzGqQx.js";import{m,a5 as Q,f as b,aH as k,ag as z,c as K,ay as B}from"./ydW6rUV-.js";import{d as W,ad as X,e as Y,t as Z,o as a,j as i,B as p,O as e,F as _,k as o,P as S,y as r,w as y,D as ee,J as D,q as c,G as te,h as T}from"./os5iY7Px.js";import{h as oe,g as ne}from"./DZ2pOKU3.js";import{u as se}from"./DEsrpVRf.js";import{u as le}from"./BuPm8lBj.js";import{u as ae}from"./CXMBrXfs.js";import"./BxBxJNCV.js";import"./DGULL8hu.js";import"./V1prML7D.js";import"./o7dP-tYH.js";import"./Cf6AsDUc.js";import"./BfGKakbq.js";import"./wOsbqTWO.js";import"./DnKCUSWV.js";import"./Cl4apfkV.js";const ie={key:0,class:"wrapper mx-auto lg:container xl:px-0 2xl:max-w-screen-2xl","data-testid":"wrp-step1Container"},re={class:"py-10"},ue={class:"mx-auto flex max-w-3xl gap-14","data-testid":"cnt-step1Form"},de={class:"p-float-label w-full self-start","data-testid":"cnt-step1Origin"},pe={id:"label-originCountry",for:"originCountry","data-testid":"lbl-step1Origin"},ce={class:"p-float-label w-full self-start","data-testid":"cnt-step1Destination"},me={class:"align-items-center flex"},fe={key:0,class:"border-hm-Grey flex flex-col gap-x-3 gap-y-2 border-t px-3 py-3","data-testid":"cnt-step1DestinationChips"},ge={class:"flex max-w-xs flex-wrap gap-2"},ve=["data-testid"],be={class:"w-11/12 truncate"},_e=["data-testid","onClick"],ye={key:0},he={key:1,class:"no-mb flex items-center justify-between px-4 py-2"},xe={id:"label-destinationCountry",for:"destinationCountry","data-testid":"lbl-step1Destination"},Ce={class:"mx-auto mt-2 grid max-w-3xl gap-14 md:grid-cols-2"},we={key:0,class:"hm-caption focus-visible focus text-hm-BlackBlue w-88 opacity-80"},ke={key:0,class:"hm-caption lg:hm-sm focus-visible focus text-hm-BlackBlue w-88 opacity-80"},Be={class:"mt-10 flex justify-center gap-5","data-testid":"cnt-step1Actions"},Ie=W({__name:"step1",setup(Se){const{allowedOriginCountries:V,allowedDestinationCountries:G,destinationChips:h,selectedCountriesString:H,extraSelectedCountriesString:O,removeDestinationCountry:$}=se(m()),{isReady:M,showLoader:P}=le(()=>!m().getterStep0Complete,"funnelStep0"),{stateContent:s,getterCountries:F,stateOriginCountry:u,stateDestinationCountries:d,getterInsuranceTypeData:g}=X(m()),f=T(null),x=T(null),C=Q(),N=C.resolve({name:"funnelStep0"})?.fullPath,R=C.resolve({name:"funnelStep2"})?.fullPath,w=()=>{let l=!0;return(!u.value||!u.value?.id)&&(l=!1),(!d.value||d.value.length===0)&&(l=!1),l};Y(async()=>{b().stateBUconfig?.config?.originCountryCode?.value?.length>1&&(await Z(),u.value=F.value?.find(l=>l.code===b().stateBUconfig?.config.originCountryCode?.value)),k({event:"hm_page_view"})}),z({title:m().stateContent?.funnel?.step1_pageTitle,meta:[{name:"description",content:m().stateContent?.funnel?.step1_description},{name:"robots",content:m().stateContent?.funnel?.step1_robots}]});const U=()=>{w()&&(L(),B(R))},L=()=>{const l={event:"select_location",item_category2:u.value.country,item_category3:ae()};k(l)};return(l,t)=>{const j=E,A=I,q=J,v=K;return a(),i(_,null,[p(j,{show:e(P),"data-testid":"ldr-step1Loader"},null,8,["show"]),e(M)?(a(),i(_,{key:0},[t[9]||(t[9]=o("div",{class:"bg-hm-SoftGrey -mt-2 py-6"},null,-1)),e(s)?(a(),i("div",ie,[p(A,{"current-step":1,"data-step":e(s)?.funnel?.generalStepsTracker,"data-testid":"stp-stepTrackerFunnel"},null,8,["data-step"]),o("div",re,[p(q,{step:1,title:e(s)?.funnel?.step1Header,subtitle:e(s)?.funnel?.step1Subtitle},null,8,["title","subtitle"]),o("div",ue,[o("div",de,[p(e(oe),{ref_key:"originDropdown",ref:x,modelValue:e(u),"onUpdate:modelValue":t[0]||(t[0]=n=>S(u)?u.value=n:null),options:e(V),"option-label":"country","option-group-label":"label","option-group-children":"items",filter:"","panel-class":"custom-panel countries",class:"custom-dropdown countries w-full","input-id":"originCountry","aria-labelledby":"label-originCountry",disabled:e(b)().stateBUconfig?.config?.lockOrigin,placeholder:e(u)?.country||"","auto-filter-focus":"","data-testid":"drp-step1OriginCountry",onHide:t[1]||(t[1]=n=>e(x).filterValue="")},null,8,["modelValue","options","disabled","placeholder"]),o("label",pe,r(e(s)?.funnel?.step1OriginPlaceholder),1)]),o("div",ce,[p(e(ne),{ref_key:"destinationMultiSelect",ref:f,modelValue:e(d),"onUpdate:modelValue":t[4]||(t[4]=n=>S(d)?d.value=n:null),options:e(G),"show-toggle-all":!1,disabled:e(g)?.lockDestination,"option-label":"country","option-group-label":"label","option-group-children":"items",filter:"","panel-class":"custom-panel countries",class:"custom-dropdown countries w-full","input-id":"destinationCountry","aria-labelledby":"label-destinationCountry","auto-filter-focus":"","data-testid":"mt-select-step1Destination",onHide:t[5]||(t[5]=n=>e(f).filterValue=""),onChange:t[6]||(t[6]=n=>e(f).filterValue="")},{value:y(()=>[te(r(e(H)),1)]),optiongroup:y(n=>[o("div",me,[o("div",null,r(n.option.label),1)])]),footer:y(()=>[e(h).length>0?(a(),i("div",fe,[o("div",ge,[(a(!0),i(_,null,ee(e(h),n=>(a(),i("span",{key:n.id,class:"no-mb group max-w-xxxs bg-hm-SoftGrey text-hm-BlackBlue hover:bg-hm-Grey pointer-events-none inline-flex w-auto items-center rounded-full px-3 py-1 font-bold transition","data-testid":`tag-step1Destination-${n.id}`},[o("p",be,r(n?.country),1),o("button",{type:"button",class:"border-hm-BlackBlue group-hover:border-hm-SoftGrey pointer-events-auto relative -mr-1 ml-1 h-4 w-4 min-w-4 rounded-full border","data-testid":`btn-step1RemoveDestination-${n.id}`,onClick:D(De=>e($)(n.id),["stop"])},[...t[8]||(t[8]=[o("span",{class:"sr-only"},"Remove",-1),o("svg",{viewBox:"0 0 14 14",class:"stroke-hm-BlackBlue group-hover:stroke-hm-SoftGrey"},[o("path",{d:"M4 4l6 6m0-6l-6 6"})],-1)])],8,_e)],8,ve))),128))]),e(d).length>6?(a(),i("span",ye,r(e(O)),1)):c("",!0)])):c("",!0),e(d).length>0?(a(),i("div",he,[o("p",{class:"text-hm-BlackBlue pointer-events-auto cursor-pointer font-semibold underline hover:no-underline",onClick:t[2]||(t[2]=D(n=>d.value=[],["stop"]))},r(e(s)?.funnel?.step1ResetButtonText),1),p(v,{mode:"filled",color:"primary",class:"font-semibold",label:e(s)?.funnel?.confirmButton,"data-testid":"btn-step1ConfirmDestination",onClick:t[3]||(t[3]=n=>e(f).hide())},null,8,["label"])])):c("",!0)]),_:1},8,["modelValue","options","disabled"]),o("label",xe,r(e(s)?.funnel?.step1CoverPlaceholder),1)])]),o("div",Ce,[o("div",null,[e(g)?.showOriginHelpMessage?(a(),i("div",we,r(e(s)?.funnel?.step1OriginHelpMessage),1)):c("",!0)]),o("div",null,[e(g)?.showCoverHelpMessage?(a(),i("div",ke,r(e(s)?.funnel?.step1CoverHelpMessage),1)):c("",!0)])]),o("div",Be,[p(v,{mode:"filled",background:"light",color:"white",class:"font-semibold",label:e(s)?.funnel?.step1Prev_ctaText,"data-testid":"btn-step1Prev",onClick:t[7]||(t[7]=n=>("navigateTo"in l?l.navigateTo:e(B))(e(N)))},null,8,["label"]),p(v,{mode:"filled",color:"primary",class:"font-semibold",disabled:!w(),label:e(s)?.funnel?.step1Next_ctaText,"data-testid":"btn-step1Next",onClick:U},null,8,["disabled","label"])])])])):c("",!0)],64)):c("",!0)],64)}}});
1export{Ie 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.