import { Component, Input } from '@angular/core';
import { UntypedFormControl } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "ngx-color-picker";
export class ColorSelectButtonComponent {
    setValue(value) {
        if (this.form?.value !== value) {
            this.form?.setValue(value);
        }
    }
}
ColorSelectButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ColorSelectButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: ColorSelectButtonComponent, selector: "ax-color-select-button", inputs: { form: "form", title: "title" }, ngImport: i0, template: "<button\n  [colorPicker]=\"form?.value\"\n  (colorPickerChange)=\"setValue($event)\"\n  [cpCancelButton]=\"true\"\n  [cpPosition]=\"'auto'\"\n  cpAlphaChannel=\"disabled\"\n  [style.background]=\"form?.value\"\n  (colorPickerClose)=\"setValue($event)\"\n></button>\n<div class=\"title\" *ngIf=\"title\">{{ title }}</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:center;width:100%;max-width:90px}.title{margin-top:.5rem}button{width:50px;height:50px;border-radius:10px;border:1px solid #7a8692;transition:border .4s cubic-bezier(.25,.8,.25,1)}button:focus{outline:0;border:1px solid var(--primary-color-500)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ColorPickerDirective, selector: "[colorPicker]", inputs: ["cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpPresetLabel", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "colorPicker", "cpPresetColors"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-color-select-button', template: "<button\n  [colorPicker]=\"form?.value\"\n  (colorPickerChange)=\"setValue($event)\"\n  [cpCancelButton]=\"true\"\n  [cpPosition]=\"'auto'\"\n  cpAlphaChannel=\"disabled\"\n  [style.background]=\"form?.value\"\n  (colorPickerClose)=\"setValue($event)\"\n></button>\n<div class=\"title\" *ngIf=\"title\">{{ title }}</div>\n", styles: [":host{display:flex;flex-direction:column;align-items:center;width:100%;max-width:90px}.title{margin-top:.5rem}button{width:50px;height:50px;border-radius:10px;border:1px solid #7a8692;transition:border .4s cubic-bezier(.25,.8,.25,1)}button:focus{outline:0;border:1px solid var(--primary-color-500)}\n"] }]
        }], propDecorators: { form: [{
                type: Input
            }], title: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sb3Itc2VsZWN0LWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvY29sb3Itc2VsZWN0LWJ1dHRvbi9jb2xvci1zZWxlY3QtYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29t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