import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Popover.pt} * @group Interface */ interface PopoverPassThroughOptions { /** * 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 options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in Popover. * @see {@link PopoverPassThroughOptions} * * @template I Type of instance. */ type PopoverPassThrough = PassThrough>; /** * Custom content template context. * @group Interface */ interface PopoverContentTemplateContext { /** * Callback to close the popover. */ closeCallback: VoidFunction; } /** * Defines valid templates in Popover. * @group Templates */ interface PopoverTemplates { /** * Custom template of content. * @param {PopoverContentTemplateContext} context - content context. */ content(context: PopoverContentTemplateContext): TemplateRef; } export type { PopoverContentTemplateContext, PopoverPassThrough, PopoverPassThroughOptions, PopoverTemplates };