import { CommonModule } from '@angular/common';
import { Input, Component, ViewEncapsulation, NgModule } from '@angular/core';
import { coerceBooleanProperty } from '@angular/cdk/coercion';

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let NtButtonGroupComponent = class NtButtonGroupComponent {
    constructor() {
        this._expanded = false;
        this.class = '';
        this.color = '';
        this.size = '';
    }
    set expanded(value) { this._expanded = coerceBooleanProperty(value); }
    get expanded() { return this._expanded; }
};
__decorate([
    Input()
], NtButtonGroupComponent.prototype, "class", void 0);
__decorate([
    Input()
], NtButtonGroupComponent.prototype, "color", void 0);
__decorate([
    Input()
], NtButtonGroupComponent.prototype, "size", void 0);
__decorate([
    Input()
], NtButtonGroupComponent.prototype, "expanded", null);
NtButtonGroupComponent = __decorate([
    Component({
        selector: 'nt-button-group, [nt-button-group]',
        template: `<ng-content></ng-content>`,
        encapsulation: ViewEncapsulation.None,
        host: {
            '[class]': '["button-group", color, size, class].join(" ")',
            '[class.expanded]': 'expanded'
        }
    })
], NtButtonGroupComponent);

var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let NtButtonComponent = class NtButtonComponent {
    constructor() {
        this._style = '';
        this._expanded = false;
        this.class = '';
        this.color = '';
        this.size = '';
    }
    set button(value) {
        if (this._validStyle(value)) {
            this._style = value;
        }
    }
    set style(value) { this._style = value; }
    get style() { return this._style; }
    set expanded(value) { this._expanded = coerceBooleanProperty(value); }
    get expanded() { return this._expanded; }
    _validStyle(value) {
        return ['', 'hollow', 'clear'].indexOf(value) > -1;
    }
};
__decorate$1([
    Input()
], NtButtonComponent.prototype, "class", void 0);
__decorate$1([
    Input()
], NtButtonComponent.prototype, "color", void 0);
__decorate$1([
    Input()
], NtButtonComponent.prototype, "size", void 0);
__decorate$1([
    Input('nt-button')
], NtButtonComponent.prototype, "button", null);
__decorate$1([
    Input()
], NtButtonComponent.prototype, "style", null);
__decorate$1([
    Input()
], NtButtonComponent.prototype, "expanded", null);
NtButtonComponent = __decorate$1([
    Component({
        selector: '[nt-button]',
        template: `<ng-content></ng-content>`,
        encapsulation: ViewEncapsulation.None,
        host: {
            '[class]': '["button", color, style, size, class].join(" ")',
            '[class.expanded]': 'expanded'
        }
    })
], NtButtonComponent);

var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let NtButtonModule = class NtButtonModule {
};
NtButtonModule = __decorate$2([
    NgModule({
        imports: [CommonModule],
        exports: [NtButtonComponent, NtButtonGroupComponent],
        declarations: [NtButtonComponent, NtButtonGroupComponent],
    })
], NtButtonModule);

export { NtButtonComponent, NtButtonGroupComponent, NtButtonModule };
//# sourceMappingURL=button.js.map
