import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * Custom passthrough(pt) options. * @see {@link Fieldset.pt} * @group Interface */ interface FieldsetPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the legend's DOM element. */ legend?: PassThroughOption; /** * Used to pass attributes to the toggle button's DOM element. */ toggleButton?: PassThroughOption; /** * Used to pass attributes to the toggle icon's DOM element. */ toggleIcon?: PassThroughOption; /** * Used to pass attributes to the legend label's DOM element. */ legendLabel?: PassThroughOption; /** * 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 options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in Fieldset component. * @see {@link FieldsetPassThroughOptions} * * @template I Type of instance. */ type FieldsetPassThrough = PassThrough>; /** * Custom panel toggle event, emits after toggle. * @see {@link Fieldset.onAfterToggle} * @group Events */ interface FieldsetAfterToggleEvent { /** * Browser event. */ originalEvent: Event; /** * Collapsed state of the panel. */ collapsed: boolean | undefined; } /** * Custom panel toggle event, emits before toggle. * @see {@link Fieldset.onBeforeToggle} * @extends {FieldsetAfterToggleEvent} * @group Events */ interface FieldsetBeforeToggleEvent extends FieldsetAfterToggleEvent { } /** * Defines valid templates in Fieldset. * @group Templates */ interface FieldsetTemplates { /** * Custom header template. */ header(): TemplateRef; /** * Custom content template. */ content(): TemplateRef; /** * Custom expand icon template. */ expandicon(): TemplateRef; /** * Custom collapse icon template. */ collapseicon(): TemplateRef; } export type { FieldsetAfterToggleEvent, FieldsetBeforeToggleEvent, FieldsetPassThrough, FieldsetPassThroughOptions, FieldsetTemplates };