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

class ChipBase {
    constructor(_elementRef) {
        this._elementRef = _elementRef;
    }
}
// eslint-disable-next-line @typescript-eslint/naming-convention
const _ChipMixinBase = mixinColor(ChipBase);
class ChipDirective extends _ChipMixinBase {
    constructor(el, renderer) {
        super(el);
        renderer.addClass(el.nativeElement, 'ax-chip');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
    static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ChipDirective, selector: "[axChip]", inputs: { color: "color" }, usesInheritance: true, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[axChip]',
                }]
        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { color: [{
                type: Input
            }] } });

class ChipComponent {
    constructor() {
        this.removed = new EventEmitter();
        this._removable = false;
    }
    set removable(removable) {
        this._removable = typeof removable === 'boolean' ? removable : true;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ChipComponent, selector: "ax-chip", inputs: { icon: "icon", removable: "removable" }, outputs: { removed: "removed" }, ngImport: i0, template: "<span axChip class=\"chip\" [ngClass]=\"{removable: _removable}\">\n  <ax-icon class=\"icon\" *ngIf=\"icon\" [name]=\"icon\"></ax-icon>\n  <ng-content></ng-content>\n  <button class=\"remove-button\" *ngIf=\"_removable\" axButton icon-button (click)=\"removed.emit()\">\n    <ax-icon class=\"icon remove-icon\" name=\"close\"></ax-icon>\n  </button>\n</span>\n", styles: [".chip{white-space:nowrap}.chip.removable{padding-right:0}button.ax-button.icon-button.remove-button{width:20px;height:20px;margin:0 .25rem}.remove-icon{width:1rem;height:1rem;line-height:1rem}.icon{height:1rem;width:1rem;line-height:1rem;margin-right:.25rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[axButton]", inputs: ["color", "labelHideMobile", "smallButton", "bigButton", "fullWidth", "filled", "outline", "icon-button", "hoverLabel", "hover", "lowercase", "disabled"] }, { kind: "directive", type: ChipDirective, selector: "[axChip]", inputs: ["color"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ChipComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-chip', template: "<span axChip class=\"chip\" [ngClass]=\"{removable: _removable}\">\n  <ax-icon class=\"icon\" *ngIf=\"icon\" [name]=\"icon\"></ax-icon>\n  <ng-content></ng-content>\n  <button class=\"remove-button\" *ngIf=\"_removable\" axButton icon-button (click)=\"removed.emit()\">\n    <ax-icon class=\"icon remove-icon\" name=\"close\"></ax-icon>\n  </button>\n</span>\n", styles: [".chip{white-space:nowrap}.chip.removable{padding-right:0}button.ax-button.icon-button.remove-button{width:20px;height:20px;margin:0 .25rem}.remove-icon{width:1rem;height:1rem;line-height:1rem}.icon{height:1rem;width:1rem;line-height:1rem;margin-right:.25rem}\n"] }]
        }], propDecorators: { icon: [{
                type: Input
            }], removed: [{
                type: Output
            }], removable: [{
                type: Input
            }] } });

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

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

export { ChipComponent, ChipDirective, ChipModule };
//# sourceMappingURL=aztrix-components-chip.mjs.map
