import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * Custom change event. * @see {@link Checkbox.onChange} * @group Events */ interface CheckboxChangeEvent { /** * Checked value. */ checked?: any; /** * Browser event. */ originalEvent?: Event; } /** * Custom checkbox icon template context. * @group Interface */ interface CheckboxIconTemplateContext { /** * State of the checkbox. */ checked: boolean; /** * Style class of the icon. */ class: string; /** * DataP attributes. */ dataP: string; } /** * Defines valid templates in Checkbox. * @group Templates */ interface CheckboxTemplates { /** * Custom checkbox icon template. * @param {Object} context - icon context. */ icon(context: CheckboxIconTemplateContext): TemplateRef; } /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link CheckboxProps.pt} * @group Interface */ interface CheckboxPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the input's DOM element. */ input?: PassThroughOption; /** * Used to pass attributes to the box's DOM element. */ box?: PassThroughOption; /** * Used to pass attributes to the icon's DOM element. */ icon?: PassThroughOption; } /** * Defines valid pass-through options in Checkbox. * @see {@link CheckboxPassThroughOptions} * * @template I Type of instance. */ type CheckboxPassThrough = PassThrough>; export type { CheckboxChangeEvent, CheckboxIconTemplateContext, CheckboxPassThrough, CheckboxPassThroughOptions, CheckboxTemplates };