import * as ng_primitives_toggle from 'ng-primitives/toggle'; 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 `ngpToggle` directive to an element to manage the toggle state. This must be applied to a `button` element. */ declare class NgpToggle { /** * Whether the toggle is selected. */ readonly selected: _angular_core.InputSignalWithTransform; /** * The default selected state for uncontrolled usage. * @default false */ readonly defaultSelected: _angular_core.InputSignalWithTransform; /** * Emits when the selected state changes. */ readonly selectedChange: _angular_core.OutputEmitterRef; /** * Whether the toggle is disabled. * @default false */ readonly disabled: _angular_core.InputSignalWithTransform; /** * The state for the toggle primitive. * @internal */ protected readonly state: ng_primitives_toggle.NgpToggleState; /** * Toggle the selected state. */ toggle(): void; /** * Set the selected state. */ setSelected(value: boolean, options?: SetterOptions): void; /** * Set the default selected state. */ setDefaultSelected(value: boolean): void; setDisabled(value: boolean): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Public state surface for the Toggle primitive. */ interface NgpToggleState { /** * Whether the toggle is selected. */ readonly selected: WritableSignal; /** * Whether the toggle is disabled. */ readonly disabled: WritableSignal; /** * Emits when the selected state changes. */ readonly selectedChange: Observable; /** * Toggle the selected state. */ toggle(event?: Event): void; /** * Set the selected state. */ setSelected(value: boolean, options?: SetterOptions): void; /** * Set the default selected state. */ setDefaultSelected(value: boolean): void; /** * Set the disabled state. */ setDisabled(value: boolean): void; } /** * Inputs for configuring the Toggle primitive. */ interface NgpToggleProps { /** * Whether the toggle is selected. */ readonly selected: Signal; /** * The default selected state for uncontrolled usage. */ readonly defaultSelected?: Signal; /** * Whether the toggle is disabled. */ readonly disabled?: Signal; /** * Callback fired when the selected state changes. */ readonly onSelectedChange?: (selected: boolean) => void; } declare const ngpToggle: ({ selected: _selected, defaultSelected: _defaultSelected, disabled: _disabled, onSelectedChange, }: NgpToggleProps) => NgpToggleState; declare const injectToggleState: { (): Signal; (options: ng_primitives_state.StateInjectionOptions): Signal; (options?: ng_primitives_state.StateInjectionOptions): Signal | Signal; }; declare const provideToggleState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; export { NgpToggle, injectToggleState, ngpToggle, provideToggleState }; export type { NgpToggleProps, NgpToggleState };