import { animations, type Easings } from '../animations'; import { type InteractionParams } from './Interaction'; export interface DisplayControllerParams { /** * The main element. Accepts both an HTMLElement or a string selector. */ element: HTMLElement; /** * If the display must be controlled through a Webflow interaction. */ interaction?: InteractionParams; /** * Defines a custom animation to be used when showing/hiding the element. */ animation?: keyof typeof animations; /** * If set to true, the element will be set to `display: none`. */ startsHidden?: boolean; /** * The duration of the animation in milliseconds. */ animationDuration?: number; /** * The easing of the animation. */ animationEasing: Easings[number]; } /** * Controls showing/hiding an element. * Works with Webflow interactions, built-in fade animations or no animations at all. */ export declare class DisplayController { private readonly interaction; private readonly animation; private readonly animationEasing; private readonly animationDuration; private visible; readonly element: HTMLElement; constructor({ element, interaction, animation, startsHidden, animationEasing, animationDuration }: DisplayControllerParams); /** * @returns If the element is visible */ isVisible: () => boolean; /** * Displays the element * @returns An awaitable promise */ show(): Promise; /** * Hides the element * @returns An awaitable promise */ hide(): Promise; }