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 { CommonModule } from '@angular/common';

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
            }] } });

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

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

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