import{d as m,i as t,q as f,E as _,s as h,o as g,a as w,b as s,P as b}from"./index.29cf2edd.js";/* empty css              */const S=m({__name:"VisaTypeSelection",props:{value:{type:Number}},emits:["change"],setup(u,{emit:r}){const l=u,a=t();let i=t(),o=t();f(async()=>{o.value=!0,await _.getVisaTypes().then(e=>{i.value=e.data,o.value=!1}).catch(e=>{o.value=!1}),l.value&&(a.value=l.value)});const c=(e,n)=>n.name.toLowerCase().indexOf(e.toLowerCase())>=0,p=()=>{r("change",a.value)};return h(()=>l.value,e=>{e&&(a.value=e),e||(a.value=null)}),(e,n)=>{const d=b;return g(),w(d,{value:a.value,"onUpdate:value":n[0]||(n[0]=v=>a.value=v),"show-search":"",placeholder:"Choose a VISA Type",options:s(i),"field-names":{label:"name",value:"id"},"filter-option":c,loading:s(o),disabled:s(o),onChange:p,"clear-icon":"","allow-clear":""},null,8,["value","options","loading","disabled"])}}});export{S as _};
