import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Panel.pt} * @group Interface */ interface PanelPassThroughOptions { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the header's DOM element. */ header?: PassThroughOption; /** * Used to pass attributes to the title's DOM element. */ title?: PassThroughOption; /** * Used to pass attributes to the header actions' DOM element. */ headerActions?: PassThroughOption; /** * Used to pass attributes to the toggle button button's DOM element. * @see {@link ButtonPassThroughOptions} */ pcToggleButton?: ButtonPassThrough; /** * Used to pass attributes to the content container's DOM element. */ contentContainer?: PassThroughOption; /** * Used to pass attributes to the content wrapper DOM element. */ contentWrapper?: PassThroughOption; /** * Used to pass attributes to the content's DOM element. */ content?: PassThroughOption; /** * Used to pass attributes to the footer's DOM element. */ footer?: PassThroughOption; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in Panel component. * @see {@link PanelPassThroughOptions} * * @template I Type of instance. */ type PanelPassThrough = PassThrough>; /** * Custom panel toggle event, emits before panel toggle. * @see {@link onBeforeToggle} * @group Interface */ interface PanelBeforeToggleEvent { /** * Browser event. */ originalEvent: Event; /** * Collapsed state of the panel. */ collapsed: boolean | undefined; } /** * Custom panel toggle event, emits after panel toggle. * @see {@link onAfterToggle} * @extends {PanelBeforeToggleEvent} * @group Interface */ interface PanelAfterToggleEvent extends PanelBeforeToggleEvent { } /** * Toggle icon template context. * @param {boolean} $implicit - Collapsed state as a boolean, implicit value. * @group Interface */ interface PanelHeaderIconsTemplateContext { /** * Collapsed state as a boolean, implicit value. */ $implicit: boolean; } /** * Defines valid templates in Panel. * @group Templates */ interface PanelTemplates { /** * Custom header template. */ header(): TemplateRef; /** * Custom icons template. */ icons(): TemplateRef; /** * Custom content template. */ content(): TemplateRef; /** * Custom footer template. */ footer(): TemplateRef; /** * Custom header icons template. * @param {PanelHeaderIconsTemplateContext} context - header icons context. */ headericons(context: PanelHeaderIconsTemplateContext): TemplateRef; } export type { PanelAfterToggleEvent, PanelBeforeToggleEvent, PanelHeaderIconsTemplateContext, PanelPassThrough, PanelPassThroughOptions, PanelTemplates };