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";
const _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) {
    const 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"));
} }
const _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 = {}));
export class AlButtonComponent {
    constructor() {
        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 });
/*@__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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWwtYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhbC9uZy1nZW5lcmljLWNvbXBvbmVudHMvIiwic291cmNlcyI6WyJuZXctY29tcG9uZW50cy9hbC1idXR0b24vYWwtYnV0dG9uLmNvbXBvbmVudC50cyIsIm5ldy1jb21wb25lbnRzL2FsLWJ1dHRvbi9hbC1idXR0b24uY29t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