/*!
 *
 * carbon-angular v0.0.7 | modal-header.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, Output, EventEmitter, Input } from "@angular/core";
import { I18n } from "./../i18n/i18n.module";
import { ExperimentalService } from "./../experimental.service";
/**
 * ***Inputs***
 * ```html
 * <ibm-modal-header>Header text</ibm-modal-header>
 * ```
 *
 * ***Outputs***
 * ```html
 * <ibm-modal-header (closeSelect)="closeModal()">Header text</ibm-modal-header>
 * ```
 */
var ModalHeader = /** @class */ (function () {
    function ModalHeader(i18n, experimental) {
        this.i18n = i18n;
        this.experimental = experimental;
        /**
         * Sets the style on the modal heading based on its category.
         */
        this.theme = "default";
        /**
         * Accessible label for the header close button.
         * Defaults to the `MODAL.CLOSE` value from the i18n service.
         */
        this.closeLabel = this.i18n.get().MODAL.CLOSE;
        /**
         * To emit the event of clicking on the close icon within the modal.
         */
        this.closeSelect = new EventEmitter();
    }
    Object.defineProperty(ModalHeader.prototype, "isExperimental", {
        get: function () {
            return this.experimental.isExperimental;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Handles click for the close icon button within the `Modal`.
     */
    ModalHeader.prototype.onClose = function () {
        this.closeSelect.emit();
    };
    ModalHeader.decorators = [
        { type: Component, args: [{
                    selector: "ibm-modal-header",
                    template: "\n\t\t<header class=\"{{theme}} bx--modal-header\">\n\t\t\t<ng-content></ng-content>\n\t\t\t<button\n\t\t\t\tclass=\"bx--modal-close\"\n\t\t\t\t[attr.aria-label]=\"closeLabel\"\n\t\t\t\t(click)=\"onClose()\">\n\t\t\t\t<ibm-icon-close16 class=\"bx--modal-close__icon\"></ibm-icon-close16>\n\t\t\t</button>\n\t\t</header>\n\n\t"
                },] },
    ];
    /** @nocollapse */
    ModalHeader.ctorParameters = function () { return [
        { type: I18n },
        { type: ExperimentalService }
    ]; };
    ModalHeader.propDecorators = {
        theme: [{ type: Input }],
        closeLabel: [{ type: Input }],
        closeSelect: [{ type: Output }]
    };
    return ModalHeader;
}());
export { ModalHeader };
//# sourceMappingURL=modal-header.component.js.map