import { Component } from '@angular/core';
import { RouterExtensions } from '@nativescript/angular';
import { transitionOptions } from '~/constants/shared.constants';

@Component({
    selector: 'ExportNew',
    moduleId: module.id,
    templateUrl: './export-new.component.html',
    styleUrls: ['./_export-new.component.scss']
})

export class ExportNewComponent {

    constructor(
        private routerExtensions: RouterExtensions
     ) {}

    onTemplatePicked(id: number) {
        if (id === null) { return; }
        this.routerExtensions.navigate(['export/newExport', id], {transition: transitionOptions});
    }

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