import { Component, EventEmitter, Input, Output } from "@angular/core";
import { ViewController } from "ionic-angular";
var ModalHeaderComponent = (function () {
    function ModalHeaderComponent(viewCtrl) {
        this.viewCtrl = viewCtrl;
        this.autoDismiss = true;
        this.dismiss = new EventEmitter();
    }
    ModalHeaderComponent.prototype.onDismiss = function (event) {
        this.dismiss.emit(event);
        if (this.autoDismiss) {
            return this.viewCtrl.dismiss(event);
        }
    };
    return ModalHeaderComponent;
}());
export { ModalHeaderComponent };
ModalHeaderComponent.decorators = [
    { type: Component, args: [{
                selector: "modal-header",
                template: "\n    <ion-toolbar>\n      <ion-title>{{title}}</ion-title>\n      <ion-buttons start>\n        <button ion-button (click)=\"onDismiss($event)\">\n          <span ion-text color=\"primary\" showWhen=\"ios\">Cancel</span>\n          <ion-icon name=\"md-close\" hideWhen=\"ios\"></ion-icon>\n        </button>\n      </ion-buttons>\n    </ion-toolbar>\n  ",
                styles: ["\n\n  "]
            },] },
];
/** @nocollapse */
ModalHeaderComponent.ctorParameters = function () { return [
    { type: ViewController, },
]; };
ModalHeaderComponent.propDecorators = {
    'title': [{ type: Input },],
    'autoDismiss': [{ type: Input },],
    'dismiss': [{ type: Output },],
};
//# sourceMappingURL=modal-header.component.js.map