import { Component, Inject, Input } from '@angular/core';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { WsEvents } from '@sunbird-cb/utils-v2';
import { switchMap, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/legacy-dialog";
import * as i2 from "@sunbird-cb/utils-v2";
import * as i3 from "../../../_services/rating.service";
import * as i4 from "@angular/material/legacy-snack-bar";
import * as i5 from "@angular/router";
import * as i6 from "@angular/common";
import * as i7 from "@angular/forms";
import * as i8 from "@angular/material/legacy-button";
import * as i9 from "@angular/material/icon";
import * as i10 from "@angular/material/legacy-form-field";
import * as i11 from "@angular/cdk/text-field";
import * as i12 from "@angular/material/legacy-input";
import * as i13 from "@angular/material/legacy-checkbox";
import * as i14 from "@ngx-translate/core";
export class ContentRatingV2DialogComponent {
    constructor(dialogRef, data, events, ratingSvc, loggerSvc, snackBar, router) {
        this.dialogRef = dialogRef;
        this.data = data;
        this.events = events;
        this.ratingSvc = ratingSvc;
        this.loggerSvc = loggerSvc;
        this.snackBar = snackBar;
        this.router = router;
        this.isEditMode = false;
        this.collectionId = '';
        this.content = null;
        this.userRating = 0;
        this.showSuccessScreen = false;
        this.formDisabled = true;
        this.isEdited = false;
        this.unsubscribe = new Subject();
        this.feedbackForm = new UntypedFormGroup({
            review: new UntypedFormControl(null, [Validators.minLength(1), Validators.maxLength(2000)]),
            rating: new UntypedFormControl(0, []),
            recommend: new UntypedFormControl(false),
        });
    }
    ngOnInit() {
        if (this.ccuserRating || this.navigatetoTOC || (this.data && this.data.courseName)) {
            const obj = {
                identifier: this.data.identifier,
                primaryCategory: this.data.primaryCategory,
            };
            const dataobj = {
                content: obj,
                userId: this.data.userId,
                userRating: this.ccuserRating,
            };
            this.data = dataobj;
        }
        if (this.data.userRating) {
            this.feedbackForm.patchValue({
                review: this.data.userRating.review,
                rating: this.data.userRating.rating,
                recommend: this.data.userRating.recommended === 'yes' ? true : false,
            });
            this.feedbackForm.updateValueAndValidity();
            this.userRating = this.data.userRating.rating;
            if (this.userRating) {
                this.formDisabled = false;
            }
        }
        if (this.data.content) {
            this.content = this.data.content;
        }
        this.feedbackForm.valueChanges
            .pipe(switchMap(async (formValue) => {
            // tslint:disable-next-line: no-console
            // console.log('formValue.review :: ', formValue.review)
            if (this.data.userRating) {
                if (formValue.review !== this.data.userRating.review
                    || formValue.rating !== this.data.userRating.rating
                    || formValue.recommend !== this.data.userRating.recommend) {
                    this.isEdited = true;
                }
                else {
                    this.isEdited = false;
                }
            }
        }), takeUntil(this.unsubscribe)).subscribe();
    }
    submitRating(feedbackForm) {
        if (!this.formDisabled) {
            const req = {
                activityId: this.data.content.identifier || '',
                userId: this.data.userId || '',
                activityType: this.data.content.primaryCategory || '',
                rating: this.userRating || 0,
                ...(feedbackForm.value.review && { review: feedbackForm.value.review }),
                recommended: feedbackForm.value.recommend ? 'yes' : 'no',
            };
            this.ratingSvc.addOrUpdateRating(req).subscribe((_res) => {
                this.raiseFeedbackTelemetry(feedbackForm);
                if (this.isEditMode) {
                    this.dialogRef.close(true);
                }
                else {
                    this.showSuccessScreen = true;
                }
            }, (err) => {
                this.loggerSvc.error('ADD OR UPDATE USER RATING ERROR >', err);
                if (err.error && err.error.params && err.error.params.errmsg) {
                    this.openSnackbar(err.error.params.errmsg);
                }
                else {
                    this.openSnackbar('Something went wrong, please try again later!');
                }
                // this.dialogRef.close(false)
            });
        }
    }
    raiseFeedbackTelemetry(feedbackForm) {
        this.events.raiseFeedbackTelemetry({
            type: this.data.content.primaryCategory,
            subType: 'rating',
            id: this.data.content.identifier || '',
        }, {
            id: this.data.content.identifier || '',
            rating: this.userRating,
            version: `${this.data.content.version}${''}`,
            // tslint:disable-next-line: no-non-null-assertion
            commenttxt: feedbackForm.value.review || '',
        });
    }
    addRating(index) {
        this.userRating = index + 1;
        if (this.userRating) {
            this.formDisabled = false;
        }
        this.events.raiseInteractTelemetry({
            type: 'rating',
            subType: 'content',
            id: this.data.content.identifier || '',
        }, {
            id: this.data.content.identifier || '',
            rating: this.userRating,
        }, {
            pageIdExt: 'rating-popup',
            module: WsEvents.EnumTelemetrymodules.FEEDBACK,
        });
        // tslint:disable-next-line: no-non-null-assertion
        this.feedbackForm.get('rating').setValue(this.userRating);
    }
    closeDialog(val) {
        if (this.navigatetoTOC) {
            this.dialogRef.close(val);
            // In case of multilingual course, redirection should happen to base collectionID
            const id = this.collectionId || this.data.content.identifier;
            this.router.navigateByUrl(`app/toc/${id}/overview`);
        }
        else {
            this.dialogRef.close(val);
        }
    }
    openSnackbar(primaryMsg, duration = 5000) {
        this.snackBar.open(primaryMsg, 'X', {
            duration,
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContentRatingV2DialogComponent, deps: [{ token: i1.MatLegacyDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.EventService }, { token: i3.RatingService }, { token: i2.LoggerService }, { token: i4.MatLegacySnackBar }, { token: i5.Router }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContentRatingV2DialogComponent, selector: "ws-widget-content-rating-v2-dialog", inputs: { ccuserRating: "ccuserRating", navigatetoTOC: "navigatetoTOC", rateFromCompletionDialog: "rateFromCompletionDialog", isEditMode: "isEditMode", collectionId: "collectionId" }, ngImport: i0, template: "<ng-container *ngIf=\"!showSuccessScreen\">\n    <section class=\"flex align-center justify-between mb-5\">\n        <div class=\"flex flex-col gap-1\">\n            <h2 class=\"mat-headline margin-remove-bottom ws-mat-black-text\">{{ 'ratingdialog.rateReview' | translate }}</h2>\n            <div class=\"mat-body-2 ws-mat-black60-text\">{{ 'ratingdialog.yourReviewFeedbackValuable' | translate }}</div>\n        </div>\n        <button mat-icon-button aria-label=\"close dialog\" mat-dialog-close>\n            <mat-icon>close</mat-icon>\n        </button>\n    </section>\n\n    <form [formGroup]=\"feedbackForm\" >\n        <section class=\"mb-5\">\n            <h3 class=\"mat-h3 margin-bottom-xs required\" >{{ 'ratingdialog.rateThis' | translate}} {{ content?.primaryCategory | lowercase }}</h3>\n            <div class=\"\" (click)=\"$event.stopPropagation();\">\n                <ng-container *ngFor=\"let start of [1, 2, 3, 4, 5]; let i = index\">\n                    <button i18n-aria-label aria-label=\"Rating\" aria-labelledby=\"rate-heading\"\n                        name=\"user-content-rating-star-{{i+1}}\" [disabled]=\"isRequesting || isDisabled\"\n                        class=\"rating-button mr-2\" mat-icon-button (click)=\"addRating(i); $event.stopPropagation();\"\n                        color=\"primary\">\n                        <mat-icon class=\"rating-icon ws-mat-black16-text\" [ngClass]=\"{'ws-mat-orange-text':(userRating || -1) > i}\">\n                            star\n                        </mat-icon>\n                    </button>\n                </ng-container>\n            </div>\n        </section>\n\n        <section class=\"w-full mb-5\" *ngIf=\"!formDisabled\">\n            <h3 class=\"mat-h3 margin-bottom-xs\" >{{ 'ratingdialog.giveReview' | translate }}</h3>\n            <div class=\"mat-body-2\">\n                <mat-form-field appearance=\"outline\" class=\"textarea-container\">\n                    <textarea id=\"review\" matInput [cdkTextareaAutosize] [cdkAutosizeMaxRows]=\"10\"\n                        [cdkAutosizeMinRows]=\"3\" maxlength=\"200\" formControlName=\"review\"\n                        placeholder=\"{{ 'ratingdialog.addReview' | translate}} {{content?.primaryCategory | lowercase}} (optional)\" i18n-placeholder #review i18n-aria-label aria-label=\"Review textarea input\" class=\"mat-body-2\"></textarea>\n                    <mat-hint align=\"end\">{{ review.value.length }} / 200 {{ 'ratingdialog.characters' | translate}}</mat-hint>\n                    <mat-error [hidden]=\"false\" i18n=\"review error | Explains review is required\"\n                        *ngIf=\"feedbackForm?.controls['review'].errors?.required\" i18n-aria-label\n                        aria-label=\"review error | Explains review is required\">\n                        {{ 'ratingdialog.addReview' | translate }} {{ content?.primaryCategory | lowercase }} {{ 'ratingdialog.optional' | translate }}\n                    </mat-error>\n                    <mat-error *ngIf=\"feedbackForm?.controls['review'].errors?.maxlength\" i18n-aria-label\n                        aria-label=\"review error | You have exceeded 200 characters\">\n                        {{ 'ratingdialog.exceededCharacters' | translate }}\n                    </mat-error>\n                </mat-form-field>\n            </div>\n        </section>\n\n        <section class=\"w-full mb-5\" *ngIf=\"!formDisabled\">\n            <mat-checkbox [color]=\"primary\" class=\"profane-radio-button mat-body-2\" formControlName=\"recommend\" >{{'ratingdialog.recommendCourse' | translate}}</mat-checkbox>\n        </section>\n\n        <mat-dialog-actions class=\"custom margin-remove-bottom no-padding\" align=\"end\">\n            <ng-container *ngIf=\"!isEditMode\">\n                <button mat-stroked-button type=\"submit\" class=\"text-white ws-mat-primary-background flex-auto-display\"\n                    [disabled]=\"feedbackForm?.invalid || formDisabled\" (click)=\"submitRating(feedbackForm)\">\n                    <span class=\"text-white\" >{{ 'ratingdialog.submit' | translate }}</span>\n                </button>\n            </ng-container>\n            <ng-container *ngIf=\"isEditMode\">\n                <button mat-stroked-button type=\"submit\" class=\"text-white ws-mat-primary-background flex-auto-display\"\n                    [disabled]=\"feedbackForm?.invalid ||  !isEdited || formDisabled\" (click)=\"submitRating(feedbackForm)\">\n                    <span class=\"text-white\" >{{ 'ratingdialog.update' | translate }}</span>\n                </button>\n            </ng-container>\n        </mat-dialog-actions>\n    </form>\n</ng-container>\n\n<div *ngIf=\"showSuccessScreen\" class=\"flex-col align-center justify-center\">\n    <div class=\"text-right\">\n        <button mat-icon-button aria-label=\"close dialog\" (click)=\"closeDialog(true)\">\n            <mat-icon>close</mat-icon>\n        </button>\n    </div>\n    <div class=\"flex flex-wrap gap-8 items-center justify-center success-msg-container\">\n        <div>\n            <img src=\"fusion-assets/images/rating.svg\" class=\"success-image\" alt=\"rating success image\" />\n        </div>\n        <div class=\"flex-col text-center sm:text-left\">\n            <div class=\"flex align-center justify-between\">\n                <h2 class=\"mat-headline margin-bottom-xxs ws-mat-black-text\">{{ 'ratingdialog.thankYouForFeedback' | translate }}</h2>\n            </div>\n            <div class=\"section-content mat-body-1\"> {{ 'ratingdialog.youCanUpdateYourFeedback' | translate }} </div>\n        </div>\n    </div>\n</div>", styles: [".rating-icon{transform:scale(1.2)}.rating-button{margin-right:10px;line-height:20px;height:24px;width:24px}::ng-deep .textarea-container{width:100%}::ng-deep .textarea-container .mat-form-field-wrapper{margin:0}::ng-deep .textarea-container .mat-form-field-infix{padding:8px 0;border-top:0px}::ng-deep .textarea-container .mat-form-field-infix textarea{min-height:52px!important;padding:8px 0}.orange{color:#f69953;font-size:24px}.no-padding{padding:0!important}.custom.mat-dialog-actions{min-height:auto}.success-msg-container{min-height:331px}@media only screen and (max-width: 599px){.success-msg-container{min-height:auto}}@media only screen and (max-width: 599px){.success-image{width:120px}}.large-icon{height:inherit;width:inherit;font-size:13rem}button:disabled{pointer-events:none;opacity:.5}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i8.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button],             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],             button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatLegacyDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatLegacyDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i10.MatLegacyError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i10.MatLegacyFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLegacyHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i11.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i12.MatLegacyInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", exportAs: ["matInput"] }, { kind: "component", type: i13.MatLegacyCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i6.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i14.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContentRatingV2DialogComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ws-widget-content-rating-v2-dialog', template: "<ng-container *ngIf=\"!showSuccessScreen\">\n    <section class=\"flex align-center justify-between mb-5\">\n        <div class=\"flex flex-col gap-1\">\n            <h2 class=\"mat-headline margin-remove-bottom ws-mat-black-text\">{{ 'ratingdialog.rateReview' | translate }}</h2>\n            <div class=\"mat-body-2 ws-mat-black60-text\">{{ 'ratingdialog.yourReviewFeedbackValuable' | translate }}</div>\n        </div>\n        <button mat-icon-button aria-label=\"close dialog\" mat-dialog-close>\n            <mat-icon>close</mat-icon>\n        </button>\n    </section>\n\n    <form [formGroup]=\"feedbackForm\" >\n        <section class=\"mb-5\">\n            <h3 class=\"mat-h3 margin-bottom-xs required\" >{{ 'ratingdialog.rateThis' | translate}} {{ content?.primaryCategory | lowercase }}</h3>\n            <div class=\"\" (click)=\"$event.stopPropagation();\">\n                <ng-container *ngFor=\"let start of [1, 2, 3, 4, 5]; let i = index\">\n                    <button i18n-aria-label aria-label=\"Rating\" aria-labelledby=\"rate-heading\"\n                        name=\"user-content-rating-star-{{i+1}}\" [disabled]=\"isRequesting || isDisabled\"\n                        class=\"rating-button mr-2\" mat-icon-button (click)=\"addRating(i); $event.stopPropagation();\"\n                        color=\"primary\">\n                        <mat-icon class=\"rating-icon ws-mat-black16-text\" [ngClass]=\"{'ws-mat-orange-text':(userRating || -1) > i}\">\n                            star\n                        </mat-icon>\n                    </button>\n                </ng-container>\n            </div>\n        </section>\n\n        <section class=\"w-full mb-5\" *ngIf=\"!formDisabled\">\n            <h3 class=\"mat-h3 margin-bottom-xs\" >{{ 'ratingdialog.giveReview' | translate }}</h3>\n            <div class=\"mat-body-2\">\n                <mat-form-field appearance=\"outline\" class=\"textarea-container\">\n                    <textarea id=\"review\" matInput [cdkTextareaAutosize] [cdkAutosizeMaxRows]=\"10\"\n                        [cdkAutosizeMinRows]=\"3\" maxlength=\"200\" formControlName=\"review\"\n                        placeholder=\"{{ 'ratingdialog.addReview' | translate}} {{content?.primaryCategory | lowercase}} (optional)\" i18n-placeholder #review i18n-aria-label aria-label=\"Review textarea input\" class=\"mat-body-2\"></textarea>\n                    <mat-hint align=\"end\">{{ review.value.length }} / 200 {{ 'ratingdialog.characters' | translate}}</mat-hint>\n                    <mat-error [hidden]=\"false\" i18n=\"review error | Explains review is required\"\n                        *ngIf=\"feedbackForm?.controls['review'].errors?.required\" i18n-aria-label\n                        aria-label=\"review error | Explains review is required\">\n                        {{ 'ratingdialog.addReview' | translate }} {{ content?.primaryCategory | lowercase }} {{ 'ratingdialog.optional' | translate }}\n                    </mat-error>\n                    <mat-error *ngIf=\"feedbackForm?.controls['review'].errors?.maxlength\" i18n-aria-label\n                        aria-label=\"review error | You have exceeded 200 characters\">\n                        {{ 'ratingdialog.exceededCharacters' | translate }}\n                    </mat-error>\n                </mat-form-field>\n            </div>\n        </section>\n\n        <section class=\"w-full mb-5\" *ngIf=\"!formDisabled\">\n            <mat-checkbox [color]=\"primary\" class=\"profane-radio-button mat-body-2\" formControlName=\"recommend\" >{{'ratingdialog.recommendCourse' | translate}}</mat-checkbox>\n        </section>\n\n        <mat-dialog-actions class=\"custom margin-remove-bottom no-padding\" align=\"end\">\n            <ng-container *ngIf=\"!isEditMode\">\n                <button mat-stroked-button type=\"submit\" class=\"text-white ws-mat-primary-background flex-auto-display\"\n                    [disabled]=\"feedbackForm?.invalid || formDisabled\" (click)=\"submitRating(feedbackForm)\">\n                    <span class=\"text-white\" >{{ 'ratingdialog.submit' | translate }}</span>\n                </button>\n            </ng-container>\n            <ng-container *ngIf=\"isEditMode\">\n                <button mat-stroked-button type=\"submit\" class=\"text-white ws-mat-primary-background flex-auto-display\"\n                    [disabled]=\"feedbackForm?.invalid ||  !isEdited || formDisabled\" (click)=\"submitRating(feedbackForm)\">\n                    <span class=\"text-white\" >{{ 'ratingdialog.update' | translate }}</span>\n                </button>\n            </ng-container>\n        </mat-dialog-actions>\n    </form>\n</ng-container>\n\n<div *ngIf=\"showSuccessScreen\" class=\"flex-col align-center justify-center\">\n    <div class=\"text-right\">\n        <button mat-icon-button aria-label=\"close dialog\" (click)=\"closeDialog(true)\">\n            <mat-icon>close</mat-icon>\n        </button>\n    </div>\n    <div class=\"flex flex-wrap gap-8 items-center justify-center success-msg-container\">\n        <div>\n            <img src=\"fusion-assets/images/rating.svg\" class=\"success-image\" alt=\"rating success image\" />\n        </div>\n        <div class=\"flex-col text-center sm:text-left\">\n            <div class=\"flex align-center justify-between\">\n                <h2 class=\"mat-headline margin-bottom-xxs ws-mat-black-text\">{{ 'ratingdialog.thankYouForFeedback' | translate }}</h2>\n            </div>\n            <div class=\"section-content mat-body-1\"> {{ 'ratingdialog.youCanUpdateYourFeedback' | translate }} </div>\n        </div>\n    </div>\n</div>", styles: [".rating-icon{transform:scale(1.2)}.rating-button{margin-right:10px;line-height:20px;height:24px;width:24px}::ng-deep .textarea-container{width:100%}::ng-deep .textarea-container .mat-form-field-wrapper{margin:0}::ng-deep .textarea-container .mat-form-field-infix{padding:8px 0;border-top:0px}::ng-deep .textarea-container .mat-form-field-infix textarea{min-height:52px!important;padding:8px 0}.orange{color:#f69953;font-size:24px}.no-padding{padding:0!important}.custom.mat-dialog-actions{min-height:auto}.success-msg-container{min-height:331px}@media only screen and (max-width: 599px){.success-msg-container{min-height:auto}}@media only screen and (max-width: 599px){.success-image{width:120px}}.large-icon{height:inherit;width:inherit;font-size:13rem}button:disabled{pointer-events:none;opacity:.5}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.MatLegacyDialogRef }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }, { type: i2.EventService }, { type: i3.RatingService }, { type: i2.LoggerService }, { type: i4.MatLegacySnackBar }, { type: i5.Router }]; }, propDecorators: { ccuserRating: [{
                type: Input
            }], navigatetoTOC: [{
                type: Input
            }], rateFromCompletionDialog: [{
                type: Input
            }], isEditMode: [{
                type: Input
            }], collectionId: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 