1import{U as B,y,x as N,o as a,c as s,d as n,w as d,f as t,K as C,j as u,F as v,k as g,r as U,l as j,b as c,n as f,e as k,t as _,g as $}from"./DVFcFjb5.js";import{n as z,i as F,u as R,l as T,r as q}from"./DXlpJomr.js";import{S as A}from"./BeafIVYn.js";import{r as V}from"./9v2cHNYf.js";const D={key:0,class:"relative cursor-default select-none px-4 py-2 text-gray-700"},E=["data-value"],K=["data-test"],M={class:"w-4/5"},G=["data-test","onClick"],H={key:0,class:"flex flex-wrap gap-3 text-sm"},I=["onClick"],X={__name:"VariousComponentsCountrySelect",props:["name","combobox_id","data_id"],setup(o){let l=U("");const L=B(),{filteredCountry:h}=y(L),S=N(),{business:i}=y(S);function b(p){i.value.countries_iso.splice(p,1)}return(p,r)=>(a(),s(v,null,[n(t(T),{as:"div",modelValue:t(i).countries_iso,"onUpdate:modelValue":r[2]||(r[2]=e=>t(i).countries_iso=e),multiple:"",class:"relative"},{default:d(()=>[n(t(z),{class:"w-full"},{default:d(()=>[n(t(F),{id:o.combobox_id,name:o.name,"data-test":o.data_id,placeholder:p.$t("search-country-placeholder"),onChange:r[0]||(r[0]=e=>C(l)?l.value=e.target.value:l=e.target.value),displayValue:e=>e.name,class:"h-11 w-full rounded-xl border border-[#00000024] py-3 pl-3 pr-9 text-base focus:outline-none 2xl:h-12 2xl:text-lg"},null,8,["id","name","data-test","placeholder","displayValue"])]),_:1}),n(t(A),{enter:"transition ease-in duration-100","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",onAfterLeave:r[1]||(r[1]=e=>C(l)?l.value="":l="")},{default:d(()=>[n(t(R),{"data-test":`${o.data_id}_ul`,class:"absolute z-40 mt-1 max-h-60 w-full overflow-auto bg-white py-1 text-xs shadow-lg 2xl:text-sm"},{default:d(()=>[t(h).length===0&&t(l)!==""?(a(),s("div",D," Unable to retrieve countries list from server. ")):u("",!0),(a(!0),s(v,null,g(t(h)(t(l)),(e,x)=>(a(),j(t(q),{value:e,"data-test":`${o.data_id}_${e.alpha2.toLowerCase()}`},{default:d(({selected:m,active:w})=>[c("div",{"data-value":e.code,class:f(["relative cursor-pointer select-none py-2 pl-2 pr-4",{"bg-primary-200":w,"text-black":!w,"bg-cxp-blue-100":m}])},[c("span",{"data-test":`${o.data_id}_txt_${e.alpha2.toLowerCase()}`,class:f(["flex justify-between",m?"font-bold":"font-normal"])},[c("span",M,[e.alpha2!==void 0?(a(),s("span",{key:0,class:f(["fi mr-1 pl-2 pr-2","fi-"+e.alpha2.toLowerCase()])},null,2)):u("",!0),k(" "+_(e.name),1)]),m?(a(),s("button",{key:0,"data-test":`${o.data_id}_remove_${e.alpha2.toLowerCase()}`,onClick:$(J=>b(x),["prevent"]),class:"flex items-center text-xs 2xl:text-sm"},[k(_(p.$t("delete-button-text"))+" ",1),n(t(V),{class:"w-3 2xl:w-4"})],8,G)):u("",!0)],10,K)],10,E)]),_:2},1032,["value","data-test"]))),256))]),_:1},8,["data-test"])]),_:1})]),_:1},8,["modelValue"]),t(i).countries_iso.length>
10?(a(),s("ul",H,[(a(!0),s(v,null,g(t(i).countries_iso,(e,x)=>(a(),s("li",{key:e.id,class:"flex items-center space-x-2 rounded-full bg-[#7cd0d824] px-5 py-1.5 2xl:py-2"},[e.alpha2!==void 0?(a(),s("span",{key:0,class:f(["fi pl-2 pr-2",`fi-${e.alpha2.toLowerCase()}`])},null,2)):u("",!0),c("span",null,_(e.name),1),c("button",{onClick:$(m=>b(x),["prevent"])},[n(t(V),{class:"w-3 2xl:w-4"})],8,I)]))),128))])):u("",!0)],64))}};export{X 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.