import { Component, Input } from '@angular/core';
import { UntypedFormControl } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@aztrix/components/button";
import * as i2 from "@aztrix/icons";
import * as i3 from "@aztrix/translate";
export 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
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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