import{C as p,E as m}from"./m6q5jxyf.js";import{p as f,P as l,a1 as s,X as n,U as t,aa as b,S as h,R as d,aB as v,u as y,Q as B,C as V,a8 as k}from"./vendor/json-editor-vue-llkaejaf.js";const C=["disabled"],S={key:0,value:"",disabled:"",hidden:""},$=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(B("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(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",S,k(e.placeholder),1)):d("",!0),t(e.$slots,"default")],10,C),[[v,y(o)]])],2)}}});export{$ as _};
