import{i as m,m as t,e as a,v as r,d as l,a as b,k as x,n as g,F as p,t as v,c as h}from"./index-DF5uCdwt.js";const w={class:"grid gap-[5px] mb-3"},f={key:0,class:"text-[11.5px] font-bold tracking-[0.02em]"},k=["value","disabled"],y=["selected"],V=["value","disabled"],z={key:1,class:"text-[11px] text-[var(--wdot-color-error)]"},B=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>")`,F=m({__name:"Select",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},label:{},error:{},size:{default:"md"}},emits:["update:modelValue"],setup(e,{emit:n}){const s=e,i=n,c=d=>{i("update:modelValue",d.target.value)},u=h(()=>s.size==="sm"?"px-3 py-2 text-[12px]":s.size==="lg"?"px-4 py-[14px] text-[15px]":"px-[13px] py-[10px] text-[13px]");return(d,C)=>(t(),a("div",w,[e.label?(t(),a("label",f,r(e.label),1)):l("",!0),b("select",{value:e.modelValue,disabled:e.disabled,class:g(["w-full rounded-[var(--wdot-radius-md)] border-[1.5px] bg-[var(--wdot-bg)] text-[var(--wdot-fg)] appearance-none cursor-pointer pr-9","bg-no-repeat bg-[right_12px_center]",e.error?"border-[var(--wdot-color-error)]":"border-[var(--wdot-border)]",u.value,"focus:outline-none focus:border-[var(--wdot-color-primary-500)]"]),style:x({backgroundImage:B}),onChange:c},[e.placeholder?(t(),a("option",{key:0,value:"",disabled:"",selected:!e.modelValue},r(e.placeholder),9,y)):l("",!0),(t(!0),a(p,null,v(e.options,o=>(t(),a("option",{key:o.value,value:o.value,disabled:o.disabled},r(o.label),9,V))),128))],46,k),e.error?(t(),a("span",z,r(e.error),1)):l("",!0)]))}});export{F as _};
