1import{defineComponent as V,ref as $,useTemplateRef as k,computed as P,watch as b,onMounted as L,openBlock as i,createBlock as p,unref as o,withCtx as c,createVNode as d,createElementVNode as y,normalizeClass as f,normalizeProps as M,guardReactiveProps as U,createElementBlock as B,Fragment as E,renderList as T,mergeProps as w,createTextVNode as x,toDisplayString as z,createCommentVNode as F}from"vue";import{_ as S}from"./search-input.vue_vue_type_script_setup_true_lang-BiVCfMUv.js";import{_ as D}from"./modal.vue_vue_type_script_setup_true_lang-ShCaOmXC.js";import{M as q}from"./modal-header-Pxrha-G-.js";import{L as A}from"./list-stack-B6OZHHHK.js";import{L as H}from"./list-item-x5BRx0Cb.js";import{F as O}from"./flag-BMtfyjyU.js";import{R as W}from"./result-empty-BVorCkVc.js";import{bX as X,Z}from"./logger-B4OCWT-4.js";import{g as u}from"./test-manager-DesYLJOQ.js";import"./base-input.vue_vue_type_script_setup_true_lang-Dr2GHKad.js";import"./control-DnbWcEGV.js";import"./hint-C-pjU_97.js";import"./custom-html-CSF7RBTT.js";import"./search-DXm2sBp_.js";import"./plugin-feature-flags-D9VJsscs.js";import"./use-body-scroll-lock-iwIC3Zn4.js";import"./arrow-back-BwjDU6vO.js";import"./picture-v2-E1-v2O99.js";import"./icon-box-DSA0bUyn.js";import"./button-RNidVG78.js";import"vue-router";const j=["data-testid"],G=V({__name:"country-select-modal",props:{active:{type:Boolean},data:{},requestedDismissAction:{},modelValue:{}},emits:["update:modelValue"],setup(h,{emit:v}){const C=v,e=h,_=X(),r=$(""),g=k("search-input"),m=P(()=>{const t=r.value.toLowerCase(),s=t.startsWith("+")?t.slice(1):t;return e.data.regions.filter(a=>a.countryName.toLowerCase().includes(t)||a.phoneCode.includes(s)).sort((a,n)=>a.phoneCode===s?-1:n.phoneCode===s?1:0)}),R=t=>{C("update:modelValue",t)},I=()=>{r.value=""};b(r,(t,s)=>{t&&!s&&e.data.onFirstInputSearch?.()});const N=t=>{e.data.onClose?.(),t&&t("cancel")};return L(()=>{e.data.onOpen?.(),_.value||g.value?.focus()}),(t,s)=>(i(),p(o(D),{scrollable:"",detent:"expanded","test-id":"country-select"},{default:c(({dismiss:a})=>[d(o(q),{title:e.data.title,onClose:n=>N(a)},null,8,["title","onClose"]),y("div",{class:f(t.$style.content),"data-testid":o(u)("content",e.data.testId)},[d(S,{ref:"search-input",modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=n=>r.value=n),class:f(t.$style.search),placeholder:e.data.searchPlaceholder,"test-id":o(u)("searchInput",e.data.testId)},null,8,["modelValue","class","placeholder","test-id"]),y("div",{class:f([t.$style.list,m.value.length===0&&t.$style.noResult,e.data.options.increasedPadding&&t.$style.increasedPadding])},[d(o(A),M(U(e.data.options.list)),{default:c(n=>[(i(!0),B(E,null,T(m.value,l=>(i(),p(o(H),w({key:l.countryCode,"test-id":o(u)(`searchItem-${l.countryCode}`,e.data.testId),title:l.countryName,"is-single-line":"","is-interactive":""},{ref_for:!0},n,{onClick:st=>R(l)}),{trailing:c(()=>[d(o(O),{lazy:"",size:"m","country-code":l.countryCode},null,8,["country-code"])]),additionalLabel:c(()=>[x("+"+z(l.phoneCode),1)]),_:2},1040,["test-id","title","onClick"]))),128))]),_:1},16),m.value.length===0?(i(),p(o(W),{key:0,title:e.data.noResultTitle,description:e.data.noResultDescription,"button-text":e.data.noResultButtonText,"test-id":o(u)("resultEmpty",e.data.testId),onClick:I},null,8,["title","description","button-text","test-id"])):F("",!0)],2)],10,j)]),_:1}))}}),J="country-select-modal_content-NvUtn",K="country-select-modal_search-NvUtn",Q="country-select-modal_noResult-NvUtn",Y="country-select-modal_list-NvUtn",tt="country-select-modal_increasedPadding-NvUtn",et={content:J,search:K,noResult:Q,list:Y,increasedPadding:tt},ot={$style:et},kt=Z(G,[["__cssModules",ot]]);export{kt as default}; 2(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode(".country-select-modal_content-NvUtn{flex-direction:column;flex-grow:1;display:flex}.country-select-modal_search-NvUtn{padding:0 var(--spacing-16) var(--spacing-8)}@media screen and (min-width:1024px){.country-select-modal_search-NvUtn{padding:0 var(--spacing-20) var(--spacing-8)}}.country-select-modal_noResult-NvUtn{justify-content:center;height:100%;display:flex}.country-select-modal_list-NvUtn{--country-select-modal-content-padding-top:0;--country-select-modal-content-padding-inline-mobile:var(--modal-list-padding-horizontal-mobile);--country-select-modal-content-padding-inline-desktop:var(--modal-list-padding-horizontal-desktop)}.country-select-modal_list-NvUtn.country-select-modal_increasedPadding-NvUtn{--country-select-modal-content-padding-top:var(--spacing-8);--country-select-modal-content-padding-inline-mobile:var(--modal-padding-modal-mobile);--country-select-modal-content-padding-inline-desktop:var(--modal-padding-modal-desktop)}.country-select-modal_list-NvUtn{padding:var(--country-select-modal-content-padding-top) var(--country-select-modal-content-padding-inline-mobile) var(--modal-padding-modal-mobile)}@media screen and (min-width:1024px){.country-select-modal_list-NvUtn{padding:var(--country-select-modal-content-padding-top) var(--country-select-modal-content-padding-inline-desktop) var(--modal-padding-modal-desktop)}}")),document.head.appendChild(n)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
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.