import{l as g,i as s,j as h,a as u,c as d,o as n,f as r,d as b,w as m,F as B,h as V,b as x}from"./vue.esm-bundler-DZdE0M9V.js";const _={class:"fct-multiple-select-group"},k={class:"input-append"},N={__name:"GetProducts",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(l){const f=g().ctx,c=s([]),a=s(""),i=s(null),v=o=>{if(o==="")return!1;a.value=!0,clearTimeout(i.value),i.value=setTimeout(()=>{f.$get("products/searchVariantByName",{name:o}).then(e=>{c.value=e.products}).catch(e=>{}).finally(()=>{a.value=!1})},500)};return h(()=>{}),(o,e)=>{const p=u("el-option"),y=u("el-select");return n(),d("div",_,[r("div",k,[b(y,{modelValue:l.value[l.fieldKey],"onUpdate:modelValue":e[0]||(e[0]=t=>l.value[l.fieldKey]=t),multiple:"",placeholder:l.field.placeholder,filterable:"",remote:"","reserve-keyword":!1,"remote-method":v,loading:a.value},{loading:m(()=>e[1]||(e[1]=[r("svg",{class:"circular",viewBox:"0 0 50 50"},[r("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})],-1)])),default:m(()=>[(n(!0),d(B,null,V(c.value,t=>(n(),x(p,{key:t.id,label:t.variation_title,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"])])])}}};export{N as default};
