import{ac as d,aa as n,n as c,aR as f}from"./index.02c939b6.js";import{d as v,u as V,c as _,o as a,i as l,e as y,F as i,t as b}from"./index.9838a17e.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,r=V();!t.modelValue&&t.defaultValue&&u("update:modelValue",t.defaultValue);const p=_(()=>t.list?f(t.list,{suffix:t.suffix}):[]),m=["overflow-hidden","text-ellipsis",...x()];return(B,o)=>(a(),l("select",{value:s.modelValue,class:c(m),onInput:o[0]||(o[0]=e=>u("update:modelValue",e.target.value))},[y("option",S,d(n(r).placeholder||"Select"),1),(a(!0),l(i,null,b(n(p),e=>(a(),l(i,{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};
