/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
import { Directive, ElementRef, HostBinding, Input, NgModule, Renderer2 } from '@angular/core';
var IgxButtonDirective = /** @class */ (function () {
    function IgxButtonDirective(_el, _renderer) {
        this._el = _el;
        this._renderer = _renderer;
        /**
         * @hidden
         */
        this._type = 'flat';
        /**
         * @hidden
         */
        this._cssClass = 'igx-button';
        /**
         * Sets/gets the `role` attribute.
         * ```typescript
         * this.button.role = 'navbutton';
         * ```
         * ```typescript
         * let buttonRole =  this.button.role;
         * ```
         * \@memberof IgxButtonDirective
         */
        this.role = 'button';
    }
    Object.defineProperty(IgxButtonDirective.prototype, "type", {
        set: /**
         * Sets the type of the button.
         * ```html
         * <button  igxButton= "icon"></button>
         * ```
         * \@memberof IgxButtonDirective
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._type = value || this._type;
            this._renderer.addClass(this._el.nativeElement, this._cssClass + "--" + this._type);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxButtonDirective.prototype, "color", {
        set: /**
         * Sets the button text color.
         * ```html
         * <button igxButton="gradient" igxButtonColor="blue"></button>
         * ```
         * \@memberof IgxButtonDirective
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._color = value || this._el.nativeElement.style.color;
            this._renderer.setStyle(this._el.nativeElement, 'color', this._color);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxButtonDirective.prototype, "background", {
        set: /**
         * Sets the background color of the button.
         * ```html
         * <button igxButton="raised" igxButtonBackground="red"></button>
         * ```
         * \@memberof IgxButtonDirective
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._backgroundColor = value || this._backgroundColor;
            this._renderer.setStyle(this._el.nativeElement, 'background', this._backgroundColor);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxButtonDirective.prototype, "label", {
        set: /**
         * Sets the `aria-label` attribute.
         * ```html
         * <button igxButton= "flat" igxLabel="Label"></button>
         * ```
         * \@memberof IgxButtonDirective
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._label = value || this._label;
            this._renderer.setAttribute(this._el.nativeElement, "aria-label", this._label);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxButtonDirective.prototype, "disabled", {
        set: /**
         * Enables/disables the button.
         *  ```html
         * <button igxButton= "fab" [disabled]="true"></button>
         * ```
         * \@memberof IgxButtonDirective
         * @param {?} val
         * @return {?}
         */
        function (val) {
            val = !!val;
            if (val) {
                this._renderer.addClass(this._el.nativeElement, this._cssClass + "--disabled");
            }
            else {
                this._renderer.removeClass(this._el.nativeElement, this._cssClass + "--disabled");
            }
        },
        enumerable: true,
        configurable: true
    });
    IgxButtonDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[igxButton]'
                },] },
    ];
    /** @nocollapse */
    IgxButtonDirective.ctorParameters = function () { return [
        { type: ElementRef, },
        { type: Renderer2, },
    ]; };
    IgxButtonDirective.propDecorators = {
        "role": [{ type: HostBinding, args: ['attr.role',] },],
        "type": [{ type: Input, args: ['igxButton',] },],
        "color": [{ type: Input, args: ['igxButtonColor',] },],
        "background": [{ type: Input, args: ['igxButtonBackground',] },],
        "label": [{ type: Input, args: ['igxLabel',] },],
        "disabled": [{ type: Input },],
    };
    return IgxButtonDirective;
}());
export { IgxButtonDirective };
function IgxButtonDirective_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxButtonDirective.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxButtonDirective.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxButtonDirective.propDecorators;
    /**
     * @hidden
     * @type {?}
     */
    IgxButtonDirective.prototype._type;
    /**
     * @hidden
     * @type {?}
     */
    IgxButtonDirective.prototype._cssClass;
    /**
     * @hidden
     * @type {?}
     */
    IgxButtonDirective.prototype._color;
    /**
     * @hidden
     * @type {?}
     */
    IgxButtonDirective.prototype._label;
    /**
     * @hidden
     * @type {?}
     */
    IgxButtonDirective.prototype._backgroundColor;
    /**
     * Sets/gets the `role` attribute.
     * ```typescript
     * this.button.role = 'navbutton';
     * ```
     * ```typescript
     * let buttonRole =  this.button.role;
     * ```
     * \@memberof IgxButtonDirective
     * @type {?}
     */
    IgxButtonDirective.prototype.role;
    /** @type {?} */
    IgxButtonDirective.prototype._el;
    /** @type {?} */
    IgxButtonDirective.prototype._renderer;
}
/**
 * The IgxButtonModule provides the {\@link IgxButtonDirective} inside your application.
 */
var IgxButtonModule = /** @class */ (function () {
    function IgxButtonModule() {
    }
    IgxButtonModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [IgxButtonDirective],
                    exports: [IgxButtonDirective]
                },] },
    ];
    return IgxButtonModule;
}());
export { IgxButtonModule };
function IgxButtonModule_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxButtonModule.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxButtonModule.ctorParameters;
}

//# sourceMappingURL=data:application/json;base64, 