import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
var PushPublishDialogComponent = (function () {
    function PushPublishDialogComponent() {
        this.hidden = false;
        this.errorMessage = null;
        this.close = new EventEmitter(false);
        this.cancel = new EventEmitter(false);
        this.doPushPublish = new EventEmitter(false);
    }
    PushPublishDialogComponent.prototype.ngOnChanges = function (change) {
        if (change.environmentStores) {
            this.selectedEnvironmentId = change.environmentStores.currentValue[0];
        }
    };
    PushPublishDialogComponent.prototype.setSelectedEnvironment = function (environmentId) {
        this.selectedEnvironmentId = environmentId;
    };
    return PushPublishDialogComponent;
}());
export { PushPublishDialogComponent };
PushPublishDialogComponent.decorators = [
    { type: Component, args: [{
                changeDetection: ChangeDetectionStrategy.OnPush,
                selector: 'cw-push-publish-dialog-component',
                template: "<cw-modal-dialog\n    [headerText]=\"'Push Publish'\"\n    [okButtonText]=\"'Push'\"\n    [hidden]=\"hidden\"\n    [okEnabled]=\"selectedEnvironmentId != null\"\n    [errorMessage]=\"errorMessage\"\n    width=\"25em\"\n    height=\"auto\"\n    (ok)=\"doPushPublish.emit(selectedEnvironmentId)\"\n    (cancel)=\"cancel.emit()\">\n  <cw-input-dropdown\n      flex\n      [value]=\"environmentStores[0]?.id\"\n      (click)=\"$event.stopPropagation()\"\n      (onDropDownChange)=\"setSelectedEnvironment($event)\">\n    <cw-input-option\n        *ngFor=\"let opt of environmentStores\"\n        [value]=\"opt.id\"\n        [label]=\"opt.name\"\n    ></cw-input-option>\n  </cw-input-dropdown>\n</cw-modal-dialog>"
            },] },
];
/** @nocollapse */
PushPublishDialogComponent.ctorParameters = function () { return []; };
PushPublishDialogComponent.propDecorators = {
    'hidden': [{ type: Input },],
    'environmentStores': [{ type: Input },],
    'errorMessage': [{ type: Input },],
    'close': [{ type: Output },],
    'cancel': [{ type: Output },],
    'doPushPublish': [{ type: Output },],
};
//# sourceMappingURL=push-publish-dialog-component.js.map