import Style from "../../../Style"; import InputControl from "./InputControl"; import { ComponentFactory, ValueOrAsync } from "../../ComponentFactory"; import TextLabelFactory from "../../TextLabelFactory"; /** Represents a single checkbox OR radio button control */ export declare class Checkbox extends InputControl { /** Create a checkbox element */ constructor(name?: string, label?: string | TextLabelFactory, type?: Checkbox.Type, checked?: boolean); /** Initialize a checkbox control factory with given values */ static with: (values: Checkbox.Initializer) => ComponentFactory; /** Initialize a checkbox control factory with given values */ static withName(name: string, label?: string | TextLabelFactory, checked?: boolean, value?: string): ComponentFactory; /** Initialize a radio button control factory with given values */ static withRadioName(name: string, label?: string | TextLabelFactory, checked?: boolean, value?: string): ComponentFactory; /** Initialize with given (observable) values; returns this */ initializeWith: (values: Checkbox.Initializer) => this; /** Type: checkbox or radio button (observed) */ type: Checkbox.Type; /** Text value used when selected (observed) */ value: string; /** Current selection status (observed/able) */ checked: boolean; /** Set to false to expand horizontally within row (observed) */ shrinkwrap: boolean; /** Returns an object containing all current values of input elements (observable) */ getFormValues(result?: {}): {}; /** Sets all input values by element name (will not trigger observable) */ setFormValues(values: any): void; /** Encapsulation of inner text element style (observed) */ readonly style_text: Style; protected focus(): void; protected blur(): void; private _observeChecked; private _inputElement; private _textElement; private _labelElement; } export declare namespace Checkbox { enum Type { Checkbox = 0, Radio = 1, } } export declare namespace Checkbox { /** Initializer for .with({ ... }) */ interface Initializer extends InputControl.Initializer { /** Property initializer */ checked: ValueOrAsync; /** Property initializer */ type?: ValueOrAsync; /** Property initializer */ style_text?: ValueOrAsync