import { IEventDetail, IEventEmitter } from '@breadstone/mosaik-elements'; import type { CustomElement } from '../Components/Abstracts/CustomElement'; import type { ControlBehaviorBase, ControlBehaviorReturn } from './Abstracts/Behavior'; import type { IDisableableProps } from './Disableable'; /** * Represents the events of the `Expandable` mixin. * * @public */ export interface IExpandableEvents { /** * Called when the element is expanded. */ expanded: IEventEmitter; /** * Called when the element is collapsed. */ collapsed: IEventEmitter; /** * Called when the element is toggled. */ toggled: IEventEmitter; } /** * Represents the `IExpandableProps` interface. * * @public */ export interface IExpandableProps { /** * Whether the element is currently expanded. */ isExpanded: boolean; } /** * Represents the `IExpandable` interface. * * @public */ export interface IExpandableBehavior { /** * Expands the element. */ expand(): void; /** * Collapses the element. */ collapse(): void; /** * Toggles the element between expanded and collapsed states. */ toggle(): void; /** * This method is invoked when the `isExpanded` property is changed. * Override this method to add custom behavior when the expanded state changes. * * @param prev - The previous value of `isExpanded`. * @param next - The new value of `isExpanded`. */ onIsExpandedChanged(prev: boolean, next: boolean): void; } /** * @public */ export declare namespace IExpandableProps { const DEFAULTS: IExpandableProps; } /** * A mixin that provides expand/collapse functionality to a custom element. * * @fires expanded {ExpandedEvent} - Fired when the element is expanded. * @fires collapsed {CollapsedEvent} - Fired when the element is collapsed. * @fires toggled {ToggledEvent} - Fired when the element is toggled. * * @public */ export declare const Expandable: >(base: T) => ControlBehaviorReturn; //# sourceMappingURL=Expandable.d.ts.map