import{C as p,H as m}from"./ebt3cj6n.js";import{p as f,U as o,W as l,Y as n,P as b,Z as t,ab as h,aB as v,u as y,X as B,a8 as V,A as k,a0 as d}from"./vendor/json-editor-vue-kcahofzr.js";const g=["disabled"],w={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 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(B("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>k(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",w,V(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[v,y(s)]])],2)}}});export{$ as _};
