import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import '@angular/forms';
import * as i1 from '@aztrix/components/button';
import { ButtonModule } from '@aztrix/components/button';
import * as i2 from '@aztrix/icons';
import { IconsModule } from '@aztrix/icons';
import * as i3 from '@aztrix/helpers';
import { HelperPipesModule } from '@aztrix/helpers';
import { CommonModule } from '@angular/common';

class ClearButtonComponent {
    clearValue() {
        this.form.setValue('');
        this.form.markAsDirty();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ClearButtonComponent, selector: "ax-clear-button", inputs: { form: "form" }, ngImport: i0, template: "<button\n  axButton\n  icon-button\n  type=\"button\"\n  (click)=\"clearValue()\"\n  [disabled]=\"form.disabled\"\n  [ariaLabel]=\"'label.clear' | translate\"\n  tabindex=\"-1\"\n>\n  <ax-icon class=\"icon\" name=\"close\"></ax-icon>\n</button>\n", styles: [":host{color:currentColor}\n"], dependencies: [{ kind: "directive", type: i1.ButtonDirective, selector: "[axButton]", inputs: ["color", "labelHideMobile", "smallButton", "bigButton", "fullWidth", "filled", "outline", "icon-button", "hoverLabel", "hover", "lowercase", "disabled"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-clear-button', template: "<button\n  axButton\n  icon-button\n  type=\"button\"\n  (click)=\"clearValue()\"\n  [disabled]=\"form.disabled\"\n  [ariaLabel]=\"'label.clear' | translate\"\n  tabindex=\"-1\"\n>\n  <ax-icon class=\"icon\" name=\"close\"></ax-icon>\n</button>\n", styles: [":host{color:currentColor}\n"] }]
        }], propDecorators: { form: [{
                type: Input
            }] } });

class ClearButtonModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonModule, declarations: [ClearButtonComponent], imports: [CommonModule, ButtonModule, IconsModule, HelperPipesModule], exports: [ClearButtonComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonModule, imports: [CommonModule, ButtonModule, IconsModule, HelperPipesModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ClearButtonModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [ClearButtonComponent],
                    imports: [CommonModule, ButtonModule, IconsModule, HelperPipesModule],
                    exports: [ClearButtonComponent],
                }]
        }] });

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

export { ClearButtonComponent, ClearButtonModule };
//# sourceMappingURL=aztrix-components-clear-button.mjs.map
