import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from 'ngx-color-picker';
import { ColorPickerModule } from 'ngx-color-picker';

class ColorSelectButtonComponent {
    setValue(value) {
        var _a, _b;
        if (((_a = this.form) === null || _a === void 0 ? void 0 : _a.value) !== value) {
            (_b = this.form) === null || _b === void 0 ? void 0 : _b.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
            }] } });

class ColorSelectButtonModule {
}
ColorSelectButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
ColorSelectButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonModule, declarations: [ColorSelectButtonComponent], imports: [CommonModule, ColorPickerModule], exports: [ColorSelectButtonComponent] });
ColorSelectButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonModule, imports: [CommonModule, ColorPickerModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ColorSelectButtonModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [ColorSelectButtonComponent],
                    imports: [CommonModule, ColorPickerModule],
                    exports: [ColorSelectButtonComponent],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { ColorSelectButtonComponent, ColorSelectButtonModule };
//# sourceMappingURL=aztrix-components-color-select-button.mjs.map
//# sourceMappingURL=aztrix-components-color-select-button.mjs.map
