import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../al-icon/al-icon.component";
var _c0 = function (a0) { return [a0]; };
function AlButtonComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelement(1, "al2-icon", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("icon", ctx_r0.icon)("iconClass", ctx_r0.iconClass)("size", i0.ɵɵpureFunction1(3, _c0, ctx_r0.iconPos == "top" ? "md" : "sm"));
} }
var _c1 = function (a0, a1, a2, a3, a4) { return [a0, a1, a2, a3, a4]; };
export var BtnType;
(function (BtnType) {
    BtnType["default"] = "default";
    BtnType["defaultOutline"] = "default-outline";
    BtnType["defaultGhost"] = "default-ghost";
    BtnType["primary"] = "primary";
    BtnType["primaryOutline"] = "primary-outline";
    BtnType["primaryGhost"] = "primary-ghost";
    BtnType["light"] = "light";
    BtnType["lightOutline"] = "light-outline";
    BtnType["lightGhost"] = "light-ghost";
    BtnType["danger"] = "danger";
    BtnType["success"] = "success";
})(BtnType || (BtnType = {}));
var AlButtonComponent = /** @class */ (function () {
    function AlButtonComponent() {
        this.label = '';
        this.type = BtnType.default;
        this.icon = '';
        this.iconClass = 'material-icons';
        this.iconPos = 'left';
        this.size = 'md';
        this.disabled = false;
        this.selected = false;
    }
    /** @nocollapse */ AlButtonComponent.ɵfac = function AlButtonComponent_Factory(t) { return new (t || AlButtonComponent)(); };
    /** @nocollapse */ AlButtonComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlButtonComponent, selectors: [["al2-button"]], inputs: { label: "label", type: "type", icon: "icon", iconClass: "iconClass", iconPos: "iconPos", size: "size", disabled: "disabled", selected: "selected" }, decls: 4, vars: 12, consts: [["type", "button", 3, "ngClass", "disabled"], ["class", "ald-btn-icon__wrapper", 4, "ngIf"], [1, "ald-btn-icon__wrapper"], [3, "icon", "iconClass", "size"]], template: function AlButtonComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "button", 0);
            i0.ɵɵtemplate(1, AlButtonComponent_div_1_Template, 2, 5, "div", 1);
            i0.ɵɵtext(2);
            i0.ɵɵpipe(3, "titlecase");
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction5(6, _c1, ctx.label ? "ald-btn" : "ald-btn-icon", ctx.icon && ctx.label ? "ald-btn--with-icon ald-btn--with-icon-" + ctx.iconPos : "", ctx.disabled ? "ald-btn--disabled" : "", "ald-btn--" + ctx.type, ctx.size == "sm" ? "ald-btn--sm" : ""))("disabled", ctx.disabled);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", ctx.icon);
            i0.ɵɵadvance(1);
            i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, ctx.label), "\n");
        } }, directives: [i1.NgClass, i1.NgIf, i2.AlIconComponent], pipes: [i1.TitleCasePipe], encapsulation: 2 });
    return AlButtonComponent;
}());
export { AlButtonComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlButtonComponent, [{
        type: Component,
        args: [{
                selector: 'al2-button',
                templateUrl: './al-button.component.html'
            }]
    }], function () { return []; }, { label: [{
            type: Input
        }], type: [{
            type: Input
        }], icon: [{
            type: Input
        }], iconClass: [{
            type: Input
        }], iconPos: [{
            type: Input
        }], size: [{
            type: Input
        }], disabled: [{
            type: Input
        }], selected: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhbC9uZy1nZW5lcmljLWNvbXBvbmVudHMvIiwic291cmNlcyI6WyJuZXctY29tcG9uZW50cy9hbC1idXR0b24vYWwtYnV0dG9uLmNvbXBvbmVudC50cyIsIm5ldy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