import { Component, Input,
    ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'

import { Router } from '@angular/router'
import { Feature } from './scheduler.service'

@Component({
    selector: 'gisaf-admin-scheduler-feature',
    templateUrl: './feature.component.html',
    styleUrls: ['./feature.component.css'],
    changeDetection: ChangeDetectionStrategy.OnPush,
    providers: [
    ],
})
export class AdminSchedulerFeatureComponent {
    @Input() feature: Feature

    constructor(
        private cdr: ChangeDetectorRef,
        private router: Router
    ) {}

    show() {
        this.router.navigate(['/map'], {
            queryParams: {
                show: this.feature.store + ':id:' + this.feature.id
            }
        })
    }
}