import { AXValueChangedEvent, AXOptionChangedEvent, MXBaseComponent, MXValueComponent } from '@acorex/cdk/common';
import { AXMaskOptions } from '@acorex/components/text-box';
import * as i0 from '@angular/core';
import { EventEmitter, AfterViewInit, OnDestroy, ElementRef, OnInit, QueryList } from '@angular/core';

/**
 * A token that specifies the  display mode of datapager component.
 */
type AXColorPaletteView = 'swatches' | 'gradient' | 'custom';
interface AXColorChangedEvent {
    color: any;
    sender: any;
}
declare abstract class AXColorPaletteParentComponent {
    abstract readonly: boolean;
    abstract disabled: boolean;
    abstract get value(): string;
    abstract onValueChanged: EventEmitter<AXValueChangedEvent<string>>;
    abstract onOptionChanged: EventEmitter<AXOptionChangedEvent>;
    abstract commitValue(value: string, u?: boolean): any;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteParentComponent, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXColorPaletteParentComponent>;
}
declare abstract class AXColorPaletteChildComponent {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteChildComponent, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXColorPaletteChildComponent>;
}
declare const AXDefaultColorPalette: {
    code: string;
}[];

/**
 * Component for selecting colors from a palette.
 *
 * @category Components
 */
declare class AXColorPaletteInputComponent extends MXBaseComponent implements AfterViewInit {
    protected _parent: AXColorPaletteParentComponent;
    private _unsubscriber;
    private colorService;
    isValid: boolean;
    _rgba: {
        r: number;
        g: number;
        b: number;
        a: number;
    };
    _hex: string;
    /**
     *  @ignore
     */
    protected _colorMode: 'hex' | 'rgba';
    /**
     *  @ignore
     */
    protected _hexMaskOptions: AXMaskOptions;
    /**
     *  @ignore
     */
    constructor();
    /**
     *  @ignore
     */
    private applyParent;
    /**
     *  @ignore
     */
    ngAfterViewInit(): void;
    /**
     *  @ignore
     */
    protected _handleChangeInputMode(): void;
    /**
     *  @ignore
     */
    protected _handleRGBAValueChanged(e: AXValueChangedEvent<number>): void;
    /**
     *  @ignore
     */
    protected _handleHEXAValueChanged(e: AXValueChangedEvent<string>): void;
    /**
     *  @ignore
     */
    private checkValid;
    /**
     *  @ignore
     */
    private get __hostClass();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteInputComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXColorPaletteInputComponent, "ax-color-palette-input", never, {}, {}, never, never, true, never>;
}

/**
 * Component for picking colors from a color palette.
 *
 * @category Components
 */
declare class AXColorPalettePickerComponent extends MXBaseComponent implements OnDestroy {
    protected _parent: AXColorPaletteParentComponent;
    private _unsubscriber;
    private colorService;
    private render;
    private zone;
    _rgba: {
        r: number;
        g: number;
        b: number;
        a: number;
    };
    private circle;
    private changingColor;
    /**
     *  @ignore
     */
    protected _gradient: number;
    /**
     *  @ignore
     */
    protected _bgColor: string;
    protected colorBoxGradientBG: i0.WritableSignal<string>;
    protected colorBoxTransparentColor: {
        r: number;
        g: number;
        b: number;
        a: number;
    };
    protected sample: i0.Signal<ElementRef<HTMLDivElement>>;
    /**
     *  @ignore
     */
    private readonly _gradientColors;
    /**
     *  @ignore
     */
    private readonly _gradients;
    /**
     *  @ignore
     */
    private readonly _colors;
    /**
     *  @ignore
     */
    private onPointerMoveListenerFn;
    private onPointerUpListenerFn;
    /**
     *  @ignore
     */
    constructor();
    ngOnDestroy(): void;
    /**
     *  @ignore
     */
    private setHSV;
    /**
     * Synchronizes internal RGBA and UI state with the parent palette value.
     *
     * Called when the parent emits onValueChanged. Updates local RGBA from the parent
     * value, recalculates gradient and pointer when the user is not actively changing
     * the color, and requests change detection.
     *
     * @returns void
     */
    parentColorChanged(): void;
    /**
     *  @ignore
     */
    protected _handleAlphaChanged(e: any): void;
    /**
     *  @ignore
     */
    protected _handleGradientChanged(e: any): void;
    /**
     *  @ignore
     */
    private setColorByXY;
    /**
     *  @ignore
     */
    private setPointerByPercent;
    protected handleMove(event: PointerEvent): void;
    protected handleDown(event: PointerEvent): void;
    protected handleUp(): void;
    private setColor;
    /**
     *  @ignore
     */
    private get __hostClass();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPalettePickerComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXColorPalettePickerComponent, "ax-color-palette-picker", never, {}, {}, never, never, true, never>;
}

/**
 * Component that displays a preview of the selected color in the palette.
 *
 * @category Components
 */
declare class AXColorPalettePreviewComponent extends MXBaseComponent implements AfterViewInit {
    _parent: AXColorPaletteParentComponent;
    private _zone;
    private _unsubscriber;
    /**
     *  @ignore
     */
    constructor();
    /**
     *  @ignore
     */
    ngAfterViewInit(): void;
    /**
     *  @ignore
     */
    private applyParent;
    /**
     *  @ignore
     */
    private get __hostClass();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPalettePreviewComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXColorPalettePreviewComponent, "ax-color-palette-preview", never, {}, {}, never, never, true, never>;
}

/**
 * Displays color swatches or favorites, allowing color selection.
 *
 * @category Components
 */
declare class AXColorPaletteSwatchesComponent extends MXBaseComponent implements OnInit, AfterViewInit {
    _parent: AXColorPaletteParentComponent;
    private _unsubscriber;
    /**
     *  @ignore
     */
    protected _selected: string;
    /**
     * List of color objects for display, each with a `code` property.
     * @defaultValue []
     */
    colors: {
        code: string;
    }[];
    /**
     *  @ignore
     */
    constructor();
    /**
     *  @ignore
     */
    private applyParent;
    /**
     *  @ignore
     */
    ngOnInit(): void;
    /**
     *  @ignore
     */
    ngAfterViewInit(): void;
    /**
     *  @ignore
     */
    protected _handleClick(e: MouseEvent, color: any): void;
    /**
     *  @ignore
     */
    private _format;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteSwatchesComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXColorPaletteSwatchesComponent, "ax-color-palette-swatches, ax-color-palette-favorite", never, { "colors": { "alias": "colors"; "required": false; }; }, {}, never, never, true, never>;
}

/**
 * A color palette component that allows for color selection and interaction.
 *
 * @category Components
 */
declare class AXColorPaletteComponent extends MXValueComponent<string> {
    _children: QueryList<AXColorPaletteChildComponent>;
    /**
     *  @ignore
     */
    private get __hostDisabled();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXColorPaletteComponent, "ax-color-palette", never, { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; }, ["_children"], ["ax-header", "ax-color-palette-preview", "ax-color-palette-picker", "ax-color-palette-swatches", "ax-color-palette-favorite", "ax-color-palette-input", "ax-footer"], true, never>;
}

declare class AXColorPaletteModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXColorPaletteModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXColorPaletteModule, never, [typeof AXColorPaletteComponent, typeof AXColorPalettePreviewComponent, typeof AXColorPaletteSwatchesComponent, typeof AXColorPaletteInputComponent, typeof AXColorPalettePickerComponent], [typeof AXColorPaletteComponent, typeof AXColorPalettePreviewComponent, typeof AXColorPaletteSwatchesComponent, typeof AXColorPaletteInputComponent, typeof AXColorPalettePickerComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXColorPaletteModule>;
}

export { AXColorPaletteChildComponent, AXColorPaletteComponent, AXColorPaletteInputComponent, AXColorPaletteModule, AXColorPaletteParentComponent, AXColorPalettePickerComponent, AXColorPalettePreviewComponent, AXColorPaletteSwatchesComponent, AXDefaultColorPalette };
export type { AXColorChangedEvent, AXColorPaletteView };
