/**
 * @fileoverview added by tsickle
 * Generated from: lib/dashboard-sidebar-item/dashboard-sidebar-item.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { ChangeDetectionStrategy, Component, Host, Input, Optional, ViewEncapsulation } from '@angular/core';
import { BbDashboardSidebarGroup } from '../dashboard-sidebar-group/dashboard-sidebar-group.component';
import { BbDashboardSidebar } from '../dashboard-sidebar/dashboard-sidebar.component';
var BbDashboardSidebarItem = /** @class */ (function () {
    function BbDashboardSidebarItem(_sidebar, _group) {
        this._sidebar = _sidebar;
        this._group = _group;
        // Inputs.
        this.tabIndex = 0;
    }
    /**
     * @return {?}
     */
    BbDashboardSidebarItem.prototype.onClick = /**
     * @return {?}
     */
    function () {
        // Try to close the sidebar if it exists.
        // this will close it on mobile.
        return this._sidebar && this._sidebar.close();
    };
    Object.defineProperty(BbDashboardSidebarItem.prototype, "attributeTabIndex", {
        get: /**
         * @return {?}
         */
        function () {
            // Make the items tabindex -1 so it can't
            // be tabbed to when the parent is not visible
            // or the parent is disabled.
            if (this.isHidden) {
                return -1;
            }
            // Else return the specified tabindex.
            return this.tabIndex;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BbDashboardSidebarItem.prototype, "isHidden", {
        get: /**
         * @return {?}
         */
        function () {
            return !this.isVisible || this.isDisabled;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BbDashboardSidebarItem.prototype, "isVisible", {
        get: /**
         * @private
         * @return {?}
         */
        function () {
            return this._group
                ? this._group.isExpanded
                : true;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BbDashboardSidebarItem.prototype, "isDisabled", {
        get: /**
         * @private
         * @return {?}
         */
        function () {
            return this._group
                ? this._group.disabled
                : false;
        },
        enumerable: true,
        configurable: true
    });
    BbDashboardSidebarItem.decorators = [
        { type: Component, args: [{
                    selector: '[bb-dashboard-sidebar-item]',
                    template: "<!--\r\n    The content between the tags will\r\n    be reflected here.\r\n-->\r\n<span class=\"bb-dashboard-sidebar-item-content\">\r\n    <ng-content></ng-content>\r\n</span>\r\n",
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                    preserveWhitespaces: false,
                    host: {
                        'class': 'bb-dashboard-sidebar-item',
                        '[attr.tabindex]': 'attributeTabIndex',
                        '[attr.aria-hidden]': 'isHidden',
                        '(click)': 'onClick()'
                    },
                    styles: [".bb-dashboard-sidebar-item{height:0;opacity:0;padding:0;display:-ms-flexbox;display:flex;line-height:0;cursor:pointer;font-size:14px;font-weight:500;-ms-flex-align:center;align-items:center;text-decoration:none;will-change:opacity,height;color:rgba(0,0,0,.85)!important;transition:height .2s cubic-bezier(0,0,.2,1),opacity .2s cubic-bezier(0,0,.2,1) 50ms,color .2s cubic-bezier(0,0,.2,1),background-color .2s cubic-bezier(0,0,.2,1)}.bb-dashboard-sidebar-item:focus,.bb-dashboard-sidebar-item:hover{background-color:rgba(0,0,0,.02)}.bb-dashboard-sidebar-item:active{background-color:rgba(0,0,0,.04)}.bb-dashboard-sidebar-item.active,.bb-dashboard-sidebar-item.active:active,.bb-dashboard-sidebar-item.active:focus,.bb-dashboard-sidebar-item.active:hover{color:#000!important;background-color:rgba(0,0,0,.06)}.bb-dashboard-sidebar-item-content{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]
                }] }
    ];
    /** @nocollapse */
    BbDashboardSidebarItem.ctorParameters = function () { return [
        { type: BbDashboardSidebar, decorators: [{ type: Optional }, { type: Host }] },
        { type: BbDashboardSidebarGroup, decorators: [{ type: Optional }, { type: Host }] }
    ]; };
    BbDashboardSidebarItem.propDecorators = {
        tabIndex: [{ type: Input }]
    };
    return BbDashboardSidebarItem;
}());
export { BbDashboardSidebarItem };
if (false) {
    /** @type {?} */
    BbDashboardSidebarItem.prototype.tabIndex;
    /**
     * @type {?}
     * @private
     */
    BbDashboardSidebarItem.prototype._sidebar;
    /**
     * @type {?}
     * @private
     */
    BbDashboardSidebarItem.prototype._group;
}
//# sourceMappingURL=data:application/json;base64, 