import{ac as d,aa as n,n as m,aR as c}from"./index.ef672c15.js";import{d as v,u as V,c as _,o as a,a as l,f as y,F as r,x as b}from"./index.477073af.js";import{t as x}from"./theme.43fc44e2.js";const g=["value"],S={disabled:"",value:""},h={key:0,disabled:""},k=["value","disabled"],N=v({__name:"InputSelect",props:{defaultValue:{type:[Number,String,Boolean],default:""},modelValue:{type:[Number,String,Boolean],default:""},list:{type:Array,default:()=>[]},suffix:{type:String,default:""}},emits:["update:modelValue"],setup(s,{emit:u}){const t=s,i=V();!t.modelValue&&t.defaultValue&&u("update:modelValue",t.defaultValue);const p=_(()=>t.list?c(t.list,{suffix:t.suffix}):[]),f=["overflow-hidden","text-ellipsis",...x()];return(B,o)=>(a(),l("select",{value:s.modelValue,class:m(f),onInput:o[0]||(o[0]=e=>u("update:modelValue",e.target.value))},[y("option",S,d(n(i).placeholder||"Select"),1),(a(!0),l(r,null,b(n(p),e=>(a(),l(r,{key:e.value},[e.value=="divider"?(a(),l("option",h,"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")):(a(),l("option",{key:1,value:e.value,disabled:!!e.disabled},d(e.label||e.name),9,k))],64))),128))],40,g))}});export{N as default};
