import { PassThroughOption, PassThrough, Confirmation } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link ConfirmPopup.pt} * @group Interface */ interface ConfirmPopupPassThroughOptions { /** * 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 content's DOM element. */ content?: PassThroughOption; /** * Used to pass attributes to the icon's DOM element. */ icon?: PassThroughOption; /** * Used to pass attributes to the message's DOM element. */ message?: PassThroughOption; /** * Used to pass attributes to the footer's DOM element. */ footer?: PassThroughOption; /** * Used to pass attributes to the reject Button component. * @see {@link ButtonPassThrough} */ pcRejectButton?: ButtonPassThrough; /** * Used to pass attributes to the accept Button component. * @see {@link ButtonPassThrough} */ pcAcceptButton?: ButtonPassThrough; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in ConfirmPopup. * @see {@link ConfirmPopupPassThroughOptions} * * @template I Type of instance. */ type ConfirmPopupPassThrough = PassThrough>; /** * Custom headless template context. * @group Interface */ interface ConfirmPopupHeadlessTemplateContext { /** * Confirmation instance. */ $implicit: Confirmation | null | undefined; } /** * Custom content template context. * @group Interface */ interface ConfirmPopupContentTemplateContext { /** * Confirmation instance. */ $implicit: Confirmation | null | undefined; } /** * Defines valid templates in ConfirmPopup. * @group Templates */ interface ConfirmPopupTemplates { /** * Custom content template. * @param {Object} context - content context. */ content(context: ConfirmPopupContentTemplateContext): TemplateRef; /** * Custom reject icon template. */ rejecticon(): TemplateRef; /** * Custom accept icon template. */ accepticon(): TemplateRef; /** * Custom headless template. * @param {Object} context - headless context. */ headless(context: ConfirmPopupHeadlessTemplateContext): TemplateRef; } export type { ConfirmPopupContentTemplateContext, ConfirmPopupHeadlessTemplateContext, ConfirmPopupPassThrough, ConfirmPopupPassThroughOptions, ConfirmPopupTemplates };