import{G as p,I as m}from"./f1cbvne4.js";import{p as f,I as l,a2 as s,Y as n,V as t,ab as b,U as h,S as d,aB as v,u as V,R as y,j as B,a9 as k}from"./vendor/json-editor-vue-g7zhhq6q.js";const S=["disabled"],g={key:0,value:"",disabled:"",hidden:""},I=f({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const o=p(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=m;return s(),l("div",{class:n(["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"])},[t(e.$slots,"icon",{},()=>[e.icon?(s(),h(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):d("",!0)]),b(y("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>B(o)?o.value=u:null),disabled:e.disabled,class:n(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(s(),l("option",g,k(e.placeholder),1)):d("",!0),t(e.$slots,"default")],10,S),[[v,V(o)]])],2)}}});export{I as _};
