import{k as g,h as s,i as h,r as u,e as d,o as n,d as r,a as B,w as m,F as V,g as b,c as k}from"./vue.esm-bundler.js?ver=1.3.25";const x={class:"fct-multiple-select-group"},_={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",x,[r("div",_,[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(V,null,b(c.value,t=>(n(),k(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};
