import{defineComponent as h,createVNode as i}from"vue";import c from"../_util/classNames.mjs";import{filterEmpty as x}from"../_util/props-util/index.mjs";import{cloneElement as y}from"../_util/vnode.mjs";import a from"../_util/vue-types/index.mjs";import S from"../config-provider/hooks/useConfigInject.mjs";import w from"./SingleNumber.mjs";const P={prefixCls:String,count:a.any,component:String,title:a.any,show:Boolean},D=h({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:P,setup(t,{attrs:u,slots:p}){const{prefixCls:r}=S("scroll-number",t);return()=>{const{prefixCls:v,count:e,title:f,show:E,component:b="sup",class:d,style:o,...C}={...t,...u},l={...C,style:o,"data-show":t.show,class:c(r.value,d),title:f};let n=e;if(e&&Number(e)%1===0){const m=String(e).split("");n=m.map((N,g)=>i(w,{prefixCls:r.value,count:Number(e),value:N,key:m.length-g},null))}o&&o.borderColor&&(l.style={...o,boxShadow:`0 0 0 1px ${o.borderColor} inset`});const s=x(p.default?.());return s&&s.length?y(s,{class:c(`${r.value}-custom-component`)},!1):i(b,l,{default:()=>[n]})}}});export{D as default};
