import type { ForwardedEventPayload } from "../../core/dom/index.js"; /** Creates a Material 3 carousel. */ declare const createCarousel: (config?: CarouselConfig) => CarouselComponent; /** Current item reported by programmatic navigation or native scrolling. */ interface CarouselChangePayload { /** The current item's index, as `getValue()` returns it; every model event carries it */ value: number; } /** Events emitted by the scroll feature and forwarded from the root. */ interface CarouselEvents { change: (payload: CarouselChangePayload) => void; focus: (payload: ForwardedEventPayload) => void; blur: (payload: ForwardedEventPayload) => void; } type CarouselVariant = "multi-browse" | "uncontained" | "hero" | "hero-center" | "full-screen"; /** Content of one carousel item. */ interface CarouselSlide { image?: string; /** Alternative text for the image; empty when the image is decorative. */ alt?: string; /** Intrinsic width of the image in pixels, the `img`'s `width` attribute: the ratio the browser reserves before the file arrives. */ width?: number; /** Intrinsic height of the image in pixels, the `img`'s `height` attribute */ height?: number; /** When the browser fetches the image. */ loading?: "eager" | "lazy"; /** How the browser decodes the image; the browser decides when unset */ decoding?: "sync" | "async" | "auto"; /** Visible label. */ title?: string; description?: string; buttonText?: string; buttonUrl?: string; /** Custom content, replaces the image and text */ content?: HTMLElement | string; } interface CarouselConfig { /** Layout, "multi-browse" by default */ variant?: CarouselVariant; slides?: CarouselSlide[]; /** Width of a large item in px. */ itemWidth?: number; /** Space between items, 8 by default (16 for full-screen) */ gap?: number; /** Space between the container edges and the items, 16 by default (0 for full-screen) */ padding?: number; /** Corner radius of the items, 28 by default */ cornerRadius?: number; /** Snap to items after scrolling; on by default except for uncontained layouts */ snap?: boolean; /** Scroll horizontal carousels with a vertical mouse wheel; false by default. */ wheel?: boolean; initialSlide?: number; minSmallItemWidth?: number; maxSmallItemWidth?: number; /** Accessible name of the carousel */ ariaLabel?: string; prefix?: string; componentName?: string; class?: string; } interface CarouselComponent { element: HTMLElement; slides: SlidesAPI; lifecycle: { destroy: () => void; }; getClass: (name: string) => string; next: () => CarouselComponent; prev: () => CarouselComponent; goTo: (index: number) => CarouselComponent; getCurrentSlide: () => number; /** Reads the current model value without changing selection. */ getValue: () => number; getVariant: () => CarouselVariant; /** Enable or disable vertical mouse wheel scrolling in place. */ setWheel: (on: boolean) => CarouselComponent; addSlide: (slide: CarouselSlide, index?: number) => CarouselComponent; removeSlide: (index: number) => CarouselComponent; destroy: () => void; on: (event: K, handler: CarouselEvents[K]) => CarouselComponent; off: (event: K, handler: CarouselEvents[K]) => CarouselComponent; addClass: (...classes: string[]) => CarouselComponent; } interface SlidesAPI { addSlide: (slide: CarouselSlide, index?: number) => SlidesAPI; removeSlide: (index: number) => SlidesAPI; updateSlide: (index: number, slide: CarouselSlide) => SlidesAPI; getSlide: (index: number) => CarouselSlide | null; getCount: () => number; getElements: () => HTMLElement[]; } export type { CarouselChangePayload, CarouselComponent, CarouselConfig, CarouselEvents, CarouselSlide, CarouselVariant, SlidesAPI }; export { createCarousel, createCarousel as default }; export { CAROUSEL_DEFAULTS, CAROUSEL_EVENTS, CAROUSEL_VARIANTS } from "./constants.js";