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";
export class ClearButtonComponent {
    clearValue() {
        this.form.setValue('');
        this.form.markAsDirty();
    }
}
ClearButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ClearButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ClearButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", 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  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"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", 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  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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xlYXItYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4u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