import { Signal } from 'typed-signals'; import { Switcher } from './Switcher'; import { PixiText, PixiTextClass, PixiTextStyle } from './utils/helpers/text'; import { type GetViewSettings } from './utils/helpers/view'; type CheckBoxStyle = { checked: GetViewSettings; unchecked: GetViewSettings; text?: PixiTextStyle; textOffset?: { x?: number; y?: number; }; }; export type CheckBoxOptions = { style: CheckBoxStyle; text?: string; TextClass?: PixiTextClass; checked?: boolean; }; /** * Creates a container-based checkbox element. * @example * new CheckBox({ * style: { * unchecked: `switch_off.png`, * checked: `switch_on.png`, * } * }); */ export declare class CheckBox extends Switcher { labelText: PixiText | undefined; /** Signal emitted when checkbox state changes. */ onCheck: Signal<(state: boolean) => void>; protected _style: CheckBoxStyle | undefined; protected _textClass: PixiTextClass; constructor(options: CheckBoxOptions); protected addLabel(text?: string, style?: PixiTextStyle): void; /** Setter, which sets a checkbox text. */ set text(text: string); /** Getter, which returns a checkbox text. */ get text(): string | ''; /** Setter, which sets a checkbox style settings. */ set style(style: CheckBoxStyle); /** Getter, which returns a checkbox style settings. */ get style(): CheckBoxStyle | undefined; /** * Aligns the text label based on the checkbox style. * This method calculates the position of the text label based on the checkbox's unchecked view dimensions * and applies any specified text offsets. * It ensures that the text label is centered vertically and positioned to the right of the checkbox * with an optional offset. * This method is called after the checkbox style is set or when the text label is updated * to ensure that the text label is always correctly positioned relative to the checkbox. * @see {@link CheckBoxStyle.textOffset} for offset options. * @see {@link getView} for how views are created. */ protected alignText(): void; /** Getter, which returns a checkbox state. */ get checked(): boolean; /** Setter, which sets a checkbox state. */ set checked(checked: boolean); /** * Setter, that sets a checkbox state without emitting a signal. * @param checked */ forceCheck(checked: boolean): void; } export {}; //# sourceMappingURL=CheckBox.d.ts.map