import type { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react'; import type { Options, Slider } from './index.js'; /** * @param options Options of the slider, with its plugins. * @param remake The slider is made again when one of these changes, as the * dependencies of an effect. It stays at its slide. * @return The ref for the element of the slider, and the slider once it is * made. */ export declare function useSlider(options?: Options, remake?: unknown[]): [RefObject, Slider | null]; /** * @return The slider of the * `` this component is in, once it is made. The component * is rendered again when the slider goes to another snap, or has * measured: what it reads of the slider is what is. */ export declare function useSliderContext(): Slider | null; /** * What a `` takes that is neither an option of the slider nor an * attribute of its element. */ export interface Own { /** Its element, `div` when nothing is said. */ as?: string; /** What is in the slider beside its slides: arrows, a caption. */ around?: ReactNode; /** * The slider is made again when one of these changes: for other * plugins. It stays at its slide. */ remake?: unknown[]; /** The snap to be at: the slider goes there when this changes. */ index?: number; /** The snap the slider goes to. */ onChange?: (index: number, slider: Slider) => void; /** The snap it came to rest at. */ onSettle?: (index: number, slider: Slider) => void; /** The slider when it is made, and null when it ends. */ onSlider?: (slider: Slider | null) => void; } /** The props of a ``. */ export type SliderProps = Omit & Omit, 'onChange'> & Own & { on?: Record; }; /** * A slider: its element, its track, and the slides that are its children. * * Options of the slider are props, and a change of one changes the slider * that exists. Plugins are read when the slider is made; listeners are * the ones of the last render. Every other prop is an attribute of the * element. * * @param props * Props. * @return Element. */ export declare function Slider({ as, className, children, around, plugins, remake, index, on, onChange, onSettle, onSlider, ...rest }: SliderProps): ReactElement; /** * A slide of a ``. Its image or film has the class `gs-media`. * * @param props * Props: `as` is its element, `div` when nothing is said. * @return Element. */ export declare const Slide: ({ as, className, ...rest }: HTMLAttributes & { as?: string; }) => ReactElement;