import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Inplace.pt} * @group Interface */ interface InplacePassThroughOptions { /** * 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 display's DOM element. */ display?: PassThroughOption; /** * Used to pass attributes to the content's DOM element. */ content?: PassThroughOption; /** * Used to pass attributes to the Button component. * @see {@link ButtonPassThrough} */ pcButton?: ButtonPassThrough; } /** * Defines valid pass-through options in Inplace. * @see {@link InplacePassThroughOptions} * * @template I Type of instance. */ type InplacePassThrough = PassThrough>; /** * Custom content template context. * @group Interface */ interface InplaceContentTemplateContext { /** * Callback to invoke to close the inplace content. */ closeCallback: (event: MouseEvent) => void; } /** * Defines valid templates in Inplace. * @group Templates */ interface InplaceTemplates { /** * Custom display template. */ display(): TemplateRef; /** * Custom content template. * @param {Object} context - content context. */ content(context: InplaceContentTemplateContext): TemplateRef; /** * Custom close icon template. */ closeicon(): TemplateRef; } export type { InplaceContentTemplateContext, InplacePassThrough, InplacePassThroughOptions, InplaceTemplates };