import { TemplateRef } from "@angular/core"; import { MotionOptions } from "@primeuix/motion"; import { PassThrough, PassThroughOption } from "primeng/api"; import { ButtonPassThrough } from "primeng/types/button"; /** * Defines the target of the ScrollTop. * @group Types */ export type ScrollTopTarget = 'window' | 'parent'; /** * Defines the scrolling behavior of the ScrollTop. * @group Types */ export type ScrollTopBehavior = 'auto' | 'smooth'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link ScrollTop.pt} * @group Interface */ export interface ScrollTopPassThroughOptions { /** * 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 Button component. * @see {@link ButtonPassThrough} */ pcButton?: ButtonPassThrough; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in ScrollTop. * @see {@link ScrollTopPassThroughOptions} * * @template I Type of instance. */ export type ScrollTopPassThrough = PassThrough>; /** * Custom icon template context. * @group Interface */ export interface ScrollTopIconTemplateContext { /** * Style class of the icon. */ styleClass: string; } /** * Defines valid templates in ScrollTop. * @group Templates */ export interface ScrollTopTemplates { /** * Custom icon template. * @param {ScrollTopIconTemplateContext} context - icon context. */ icon(context: ScrollTopIconTemplateContext): TemplateRef; }