import { Component, OnInit } from '@angular/core';
import { ModalDialogParams, RouterExtensions } from '@nativescript/angular';
import { CongEventDecisionOutput } from '~/pages/event/entities/cong-event-detail.types';



@Component({
    selector: 'CongDecisionDetailModal',
    moduleId: module.id,
    templateUrl: './cong-decision-detail-modal.component.html',
})
export class CongDecisionDetailModalComponent implements OnInit {
    decision: CongEventDecisionOutput;



    constructor(
        private routerExtensions: RouterExtensions,
        private params: ModalDialogParams,
    ) {
    }

    ngOnInit(): void {
        this.decision = this.params.context;
    }


    close() {
        this.params.closeCallback();
    }



    onBackButton(): void {
        this.routerExtensions.back();
    }
}