/* Copyright © 2024 Melbet - All Rights Reserved */ import{toRefs as F,reactive as P,unref as t,computed as c,watch as m}from"../../../../shared-assets/__shared_vue_deps_SRT2KB67.js";import{fixFloat as h,fixFloatTwoDigits as p}from"./6BifvK_5jOPo.js";import{clamp as I}from"./entry-Bl6dkD65.js";const T=l=>{const{position:n,min:i,max:s,step:r,carousel:a}=F(P(l)),u=t(n),o=c({get:()=>t(n),set:e=>{n.value=h(I(t(e),t(i),t(s)))}}),f=c(()=>t(n)t(n)>t(i)),x=()=>{const e=p(t(o)+t(r));o.value=t(a)&&e>t(s)?t(i):e},w=()=>{const e=p(t(o)-t(r));o.value=t(a)&&e{o.value=u};m(n,e=>{t(o)!==e&&(o.value=e)});const g=c(()=>[t(i),t(s)]);return m(g,([e,D])=>{(t(o)D)&&(o.value=t(o))}),{position:o,canIncrement:f,canDecrement:v,increment:x,decrement:w,reset:d}};export{T as useStepper};