import { ComputedRef, Ref } from 'vue' export interface ISliderProps { modelValue: number | number[] min: number max: number step: number value: number | number[] showInput: boolean showInputControls: boolean inputSize: string showStops: boolean showTooltip: boolean formatTooltip: (val: number) => number | string disabled: boolean range: boolean vertical: boolean height: string debounce: number label: string tooltipClass: string marks: Record } export interface ISliderInitData { firstValue: Nullable secondValue: Nullable oldValue: Nullable dragging: boolean sliderSize: number } export interface ISliderProvider { disabled: ComputedRef min: ComputedRef max: ComputedRef step: ComputedRef showTooltip: ComputedRef precision: ComputedRef sliderSize: ComputedRef formatTooltip: ComputedRef<(value: number) => number | string> emitChange: () => void resetSize: () => void updateDragging: (val: boolean) => void } export type Mark = { point: number position: number mark: {[s: string]: any;} } export type Marks = ComputedRef export type Stops = { stops: ComputedRef getStopStyle: (position: number) => CSSStyleDeclaration } export type Slide = { slider: Ref firstButton: Ref secondButton: Ref sliderDisabled: ComputedRef minValue: ComputedRef maxValue: ComputedRef runwayStyle: ComputedRef barStyle: ComputedRef resetSize: () => void setPosition: (percent: number) => void emitChange: () => void onSliderClick: (event: MouseEvent) => void } export type ButtonRefs = { [s in 'firstButton' | 'secondButton']: Ref> } export interface ISliderButtonProps { modelValue: number vertical: boolean tooltipClass: string } export interface ISliderButtonInitData { hovering: boolean dragging: boolean isClick: boolean startX: number currentX: number startY: number currentY: number startPosition: number newPosition: number oldValue: number } export interface ISliderButton { tooltip: Ref> tooltipVisible: Ref showTooltip: Ref wrapperStyle: ComputedRef formatValue: ComputedRef handleMouseEnter: () => void handleMouseLeave: () => void onButtonDown: (event: MouseEvent | TouchEvent) => void onLeftKeyDown: () => void onRightKeyDown: () => void setPosition: (newPosition: number) => void }