import * as ng_primitives_checkbox from 'ng-primitives/checkbox'; import * as _angular_core from '@angular/core'; import { Signal, WritableSignal } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import * as ng_primitives_state from 'ng-primitives/state'; import { SetterOptions } from 'ng-primitives/state'; import { Observable } from 'rxjs'; /** * Apply the `ngpCheckbox` directive to an element to that represents the checkbox, such as a `button`. */ declare class NgpCheckbox { /** * The id of the checkbox. * @internal */ readonly id: _angular_core.InputSignal; /** * Defines whether the checkbox is checked. */ readonly checked: _angular_core.InputSignalWithTransform; /** * The default checked state for uncontrolled usage. * @default false */ readonly defaultChecked: _angular_core.InputSignalWithTransform; /** * The event that is emitted when the checkbox value changes. */ readonly checkedChange: _angular_core.OutputEmitterRef; /** * Defines whether the checkbox is indeterminate. */ readonly indeterminate: _angular_core.InputSignalWithTransform; /** * The event that is emitted when the indeterminate value changes. */ readonly indeterminateChange: _angular_core.OutputEmitterRef; /** * Whether the checkbox is required. */ readonly required: _angular_core.InputSignalWithTransform; /** * Defines whether the checkbox is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; /** * The state of the checkbox. */ protected readonly state: ng_primitives_checkbox.NgpCheckboxState; toggle(event?: Event): void; /** * Update the checked value. */ setChecked(value: boolean, options?: SetterOptions): void; /** * Set the default checked state. */ setDefaultChecked(value: boolean): void; /** * Update the indeterminate value. */ setIndeterminate(value: boolean): void; /** * Set the disabled value. */ setDisabled(value: boolean): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Public state surface for the Checkbox primitive. */ interface NgpCheckboxState { /** * The id of the checkbox. */ readonly id: Signal; /** * Whether the checkbox is checked. */ readonly checked: WritableSignal; /** * Whether the checkbox is indeterminate. */ readonly indeterminate: WritableSignal; /** * Whether the checkbox is disabled. */ readonly disabled: WritableSignal; /** * Emits when the checked state changes. */ readonly checkedChange: Observable; /** * Emits when the indeterminate state changes. */ readonly indeterminateChange: Observable; /** * Toggle the checkbox value. */ toggle(event?: Event): void; /** * Update the checked value. */ setChecked(value: boolean, options?: SetterOptions): void; /** * Set the default checked state. */ setDefaultChecked(value: boolean): void; /** * Update the indeterminate value. */ setIndeterminate(value: boolean): void; /** * Set the disabled value. */ setDisabled(value: boolean): void; } /** * Inputs for configuring the Checkbox primitive. */ interface NgpCheckboxProps { /** * The id of the checkbox. */ readonly id?: Signal; /** * Whether the checkbox is checked. */ readonly checked?: Signal; /** * The default checked state for uncontrolled usage. */ readonly defaultChecked?: Signal; /** * Whether the checkbox is indeterminate. */ readonly indeterminate?: Signal; /** * Whether the checkbox is disabled. */ readonly disabled?: Signal; /** * Whether the checkbox is required. */ readonly required?: Signal; /** * Callback fired when the checked state changes. */ readonly onCheckedChange?: (checked: boolean) => void; /** * Callback fired when the indeterminate state changes. */ readonly onIndeterminateChange?: (indeterminate: boolean) => void; } declare const ngpCheckbox: ({ id, checked: _checked, defaultChecked: _defaultChecked, indeterminate: _indeterminate, disabled: _disabled, required: _required, onCheckedChange, onIndeterminateChange, }: NgpCheckboxProps) => NgpCheckboxState; declare const injectCheckboxState: { (): Signal; (options: ng_primitives_state.StateInjectionOptions): Signal; (options?: ng_primitives_state.StateInjectionOptions): Signal | Signal; }; declare const provideCheckboxState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; export { NgpCheckbox, injectCheckboxState, ngpCheckbox, provideCheckboxState }; export type { NgpCheckboxProps, NgpCheckboxState };