/**
 * @fileoverview added by tsickle
 * Generated from: lib/widgets/entry-components/modal/services/modal.service.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import * as tslib_1 from "tslib";
import { ModalController } from '@ionic/angular';
import { Injectable } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
var ModalService = /** @class */ (function () {
    function ModalService(modalController) {
        this.modalController = modalController;
    }
    /**
     * @param {?} component
     * @param {?=} param
     * @return {?}
     */
    ModalService.prototype.presentModal = /**
     * @param {?} component
     * @param {?=} param
     * @return {?}
     */
    function (component, param) {
        return tslib_1.__awaiter(this, void 0, void 0, function () {
            var _a;
            return tslib_1.__generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.modalController.create({
                                component: component,
                                componentProps: param
                            })];
                    case 1:
                        _a.modal = _b.sent();
                        return [4 /*yield*/, this.modal.present()];
                    case 2:
                        _b.sent();
                        return [2 /*return*/, this.modal];
                }
            });
        });
    };
    ModalService.decorators = [
        { type: Injectable, args: [{
                    providedIn: 'root'
                },] }
    ];
    /** @nocollapse */
    ModalService.ctorParameters = function () { return [
        { type: ModalController }
    ]; };
    /** @nocollapse */ ModalService.ngInjectableDef = i0.defineInjectable({ factory: function ModalService_Factory() { return new ModalService(i0.inject(i1.ModalController)); }, token: ModalService, providedIn: "root" });
    return ModalService;
}());
export { ModalService };
if (false) {
    /** @type {?} */
    ModalService.prototype.modal;
    /**
     * @type {?}
     * @private
     */
    ModalService.prototype.modalController;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvd2lkZ2V0cy9lbnRyeS1jb21wb25lbnRzL21vZGFsL3NlcnZpY2VzL21v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