import{f as e}from"./utils-lib.js?v=20260328163632";import{k as t,r as l,w as o,o as a,O as s,s as i}from"./base-lib.js?v=20260328163632";import{i as u,n,j as r,h as c}from"./naive-ui.js?v=20260328163632";const p=t({name:"BtSelectIcon",props:{modelValue:{type:[Array,String,Number],default:""},options:{type:Array,default:()=>[]},width:{type:[String,Number],default:"100%"},icon:{type:String,default:""},isActive:{type:Boolean,default:!1},...u},emits:["update:modelValue","iconClick","focus","blur"],setup(t,{slots:u,emit:p,attrs:d}){const m=l(t.modelValue);o((()=>t.modelValue),(e=>{m.value=e}));const f=l(!1);a((()=>{t.isActive&&p("iconClick")}));const v=e=>{p("focus",e),f.value=!0},y=e=>{p("blur",e),f.value=!1},b=e=>{p("update:modelValue",e)};return()=>s(c,null,{default:()=>[u.prefix&&u.prefix(),s(n,i(t,d,{value:m.value,options:t.options,onFocus:v,onBlur:y,"onUpdate:value":b,style:{width:t.width}}),null),s(r,{class:"cursor-pointer flex items-center",onClick:()=>p("iconClick")},{default:()=>[s(e,{icon:t.icon},null)]})]})}});export{p as B};
