import { TemplateRef } from "@angular/core"; import { PassThrough, PassThroughOption } from "primeng/api"; /** * Defines the layout orientation for Splitter component. * @group Types */ export type SplitterLayout = 'horizontal' | 'vertical'; /** * Defines the state storage type for Splitter component. * @group Types */ export type SplitterStateStorage = 'session' | 'local'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Splitter.pt} * @group Interface */ export interface SplitterPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the panel's DOM element. */ panel?: PassThroughOption; /** * Used to pass attributes to the gutter's DOM element. */ gutter?: PassThroughOption; /** * Used to pass attributes to the gutter handle's DOM element. */ gutterHandle?: PassThroughOption; } /** * Defines valid pass-through options in Splitter component. * @see {@link SplitterPassThroughOptions} * * @template I Type of instance. */ export type SplitterPassThrough = PassThrough>; /** * Custom pass-through(pt) options for SplitterPanel. * @template I Type of instance. * * @see {@link SplitterPanel.pt} * @group Interface */ export interface SplitterPanelPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; } /** * Defines valid pass-through options in SplitterPanel component. * @see {@link SplitterPanelPassThroughOptions} * * @template I Type of instance. */ export type SplitterPanelPassThrough = PassThrough>; /** * Custom panel resize start event. * @see {@link Splitter.onResizeStart} * @group Events */ export interface SplitterResizeStartEvent { /** * Browser event. */ originalEvent: PointerEvent | KeyboardEvent; /** * Sizes of the panels, can be percentages, pixels, rem, or other CSS units. */ sizes: (number | string)[]; } /** * Custom panel resize event, invoked continuously while a gutter is being dragged. * @see {@link Splitter.onResize} * @extends {SplitterResizeStartEvent} * @group Events */ export interface SplitterResizeEvent extends SplitterResizeStartEvent {} /** * Custom panel resize end event. * @see {@link Splitter.onResizeEnd} * @extends {SplitterResizeStartEvent} * @group Events */ export interface SplitterResizeEndEvent extends SplitterResizeStartEvent {} /** * Custom collapse event, invoked when a collapsible panel collapses or expands. * @see {@link Splitter.onCollapse} * @group Events */ export interface SplitterCollapseEvent { /** * Index of the panel whose collapsed state changed. */ index: number; /** * Current collapsed state of the panel. */ collapsed: boolean; /** * Sizes of the panels at the moment the change happened. */ sizes: number[]; } /** * Defines valid templates in Splitter. * @group Templates */ export interface SplitterTemplates { /** * Custom panel template. */ panel(): TemplateRef; }