/*!
 *
 * carbon-angular v0.0.5 | header-action.component.js
 *
 * Copyright 2014, 2019 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


import { Component, Input, Output, EventEmitter } from "@angular/core";
/**
 * Contained by `HeaderGlobal`. Generally used to trigger `Panel`s
 */
var HeaderAction = /** @class */ (function () {
    function HeaderAction() {
        /**
         * Title. Populates the aria-label as well as the browser `title` tooltip
         */
        this.title = "";
        /**
         * Toggles the active state. May be used to toggle a `Panel`s active state.
         */
        this.active = false;
        /**
         * "Change" emitter to allow double binding to the `active` Input.
         */
        this.activeChange = new EventEmitter();
        /**
         * Emits when the action has been clicked.
         */
        this.selected = new EventEmitter();
    }
    HeaderAction.prototype.onClick = function () {
        this.active = !this.active;
        this.selected.emit(this.active);
        this.activeChange.emit(this.active);
    };
    HeaderAction.decorators = [
        { type: Component, args: [{
                    selector: "ibm-header-action",
                    template: "\n\t\t<button\n\t\t\tclass=\"bx--header__action\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--header__action--active': active\n\t\t\t}\"\n\t\t\t[attr.aria-label]=\"title\"\n\t\t\t[title]=\"title\"\n\t\t\t(click)=\"onClick()\">\n\t\t\t<ng-content></ng-content>\n\t\t\t<svg ibmIconClose20 class=\"bx--navigation-menu-panel-collapse-icon\"></svg>\n\t\t</button>\n\t"
                },] },
    ];
    HeaderAction.propDecorators = {
        title: [{ type: Input }],
        active: [{ type: Input }],
        activeChange: [{ type: Input }],
        selected: [{ type: Output }]
    };
    return HeaderAction;
}());
export { HeaderAction };
//# sourceMappingURL=header-action.component.js.map