import{z as p,E as m}from"./nsy6o4py.js";import{k as f,Q as o,S as l,V as n,M as b,W as t,a8 as h,az as y,u as V,U as k,a5 as v,y as B,Y as d}from"./vendor/json-editor-vue-fw81xiot.js";const S=["disabled"],g={key:0,value:"",disabled:"",hidden:""},C=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=p(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=m;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),b(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),h(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>B(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",g,v(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,S),[[y,V(s)]])],2)}}});export{C as _};
