import * as _angular_core from '@angular/core'; import { Signal, WritableSignal } from '@angular/core'; import * as ng_primitives_state from 'ng-primitives/state'; import { SetterOptions } from 'ng-primitives/state'; import * as ng_primitives_switch from 'ng-primitives/switch'; import { BooleanInput } from '@angular/cdk/coercion'; import { Observable } from 'rxjs'; /** * Apply the `ngpSwitchThumb` directive to an element within a switch to represent the thumb. */ declare class NgpSwitchThumb { constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Public state surface for the Switch Thumb primitive. */ interface NgpSwitchThumbState { /** * Whether the switch is checked. */ readonly checked: Signal; /** * Whether the switch is disabled. */ readonly disabled: Signal; } /** * Inputs for configuring the Switch Thumb primitive. */ interface NgpSwitchThumbProps { } declare const ngpSwitchThumb: ({}: NgpSwitchThumbProps) => NgpSwitchThumbState; declare const injectSwitchThumbState: { (): Signal; (options: ng_primitives_state.StateInjectionOptions): Signal; (options?: ng_primitives_state.StateInjectionOptions): Signal | Signal; }; declare const provideSwitchThumbState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; /** * Apply the `ngpSwitch` directive to an element to manage the checked state. */ declare class NgpSwitch { /** * The id of the switch. If not provided, a unique id will be generated. */ readonly id: _angular_core.InputSignal; /** * Determine if the switch is checked. When defined the switch is controlled. */ readonly checked: _angular_core.InputSignalWithTransform; /** * The default checked state for uncontrolled usage. * @default false */ readonly defaultChecked: _angular_core.InputSignalWithTransform; /** * Emits when the checked state changes. */ readonly checkedChange: _angular_core.OutputEmitterRef; /** * Determine if the switch is disabled. * @default false */ readonly disabled: _angular_core.InputSignalWithTransform; /** * Whether the switch is required. * @default false */ readonly required: _angular_core.InputSignalWithTransform; /** * The switch state. * @internal */ readonly state: ng_primitives_switch.NgpSwitchState; /** * Toggle the checked state. */ toggle(): void; /** * Update the checked value. */ setChecked(value: boolean, options?: SetterOptions): void; /** * Update the disabled value. */ setDisabled(value: boolean): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Public state surface for the Switch primitive. */ interface NgpSwitchState { /** * The id of the switch. */ readonly id: Signal; /** * Whether the switch is checked. */ readonly checked: WritableSignal; /** * Whether the switch is disabled (includes form control state). */ readonly disabled: WritableSignal; /** * Emits when the checked state changes. */ readonly checkedChange: Observable; /** * Toggle the switch state. */ toggle(event?: Event): void; /** * Update the checked value. */ setChecked(value: boolean, options?: SetterOptions): void; /** * Set the default checked state used in uncontrolled mode. */ setDefaultChecked(value: boolean): void; /** * Update the disabled value. */ setDisabled(value: boolean): void; } /** * Inputs for configuring the Switch primitive. */ interface NgpSwitchProps { /** * The id of the switch. */ readonly id?: Signal; /** * Whether the switch is checked. When defined the switch is controlled. */ readonly checked?: Signal; /** * The default checked state for uncontrolled usage. */ readonly defaultChecked?: Signal; /** * Whether the switch is disabled. */ readonly disabled?: Signal; /** * Whether the switch is required. */ readonly required?: Signal; /** * Callback fired when the checked state changes. */ readonly onCheckedChange?: (checked: boolean) => void; } declare const ngpSwitch: ({ id, checked: _checked, defaultChecked: _defaultChecked, disabled: _disabled, required: _required, onCheckedChange, }: NgpSwitchProps) => NgpSwitchState; declare const injectSwitchState: { (): Signal; (options: ng_primitives_state.StateInjectionOptions): Signal; (options?: ng_primitives_state.StateInjectionOptions): Signal | Signal; }; declare const provideSwitchState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; export { NgpSwitch, NgpSwitchThumb, injectSwitchState, injectSwitchThumbState, ngpSwitch, ngpSwitchThumb, provideSwitchState, provideSwitchThumbState }; export type { NgpSwitchProps, NgpSwitchState, NgpSwitchThumbProps, NgpSwitchThumbState };