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