import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ListViewEventData } from 'nativescript-ui-listview';
import { MeetingDateAllResult } from '../../entities/output/meetingDateAllResult';

@Component({
    selector: 'MeetingDateListView',
    moduleId: module.id,
    templateUrl: './meeting-date-list-view.component.html',
    styleUrls: ['./_meeting-date-list-view.component.scss']
})

export class MeetingDateListViewComponent {
    @Input() items: MeetingDateAllResult[];
    @Output() tapItem = new EventEmitter<number>();

    templateSelector(item: any, index: number, items: any): string {
        return 'default';
    }

    onTapItem(event: ListViewEventData) {
        this.tapItem.emit(this.items[event.index].ID);
    }

    get rightIcon() {
        return String.fromCharCode(0xf105);
    }
}
