import { Context } from '@nuxt/types';
import { AbstractRegistry } from '~/src/registry';

export class ProjectViewRegistry extends AbstractRegistry<ProjectView> {

	public constructor(context: Context) {
		super(context);

		// Overview page
		this.register('overview', {
			name: 'VIEW_OVERVIEW',
			icon: require('~/assets/img/sidebar/overview.svg')
		}, 0);

		// Tasks table view
		this.register('tasks', {
			name: 'VIEW_TASKS',
			icon: require('~/assets/img/sidebar/tasks.svg')
		}, 10);

		// Kanban view
		this.register('kanban', {
			name: 'VIEW_KANBAN',
			icon: require('~/assets/img/sidebar/kanban.svg'),
			// creation: [
			// 	{
			// 		icon: 'mdi mdi-view-column',
			// 		title: 'Create list',
			// 		description: 'Kanban lists provide an effective way to categorize your tasks',
			// 		handler: 'requestList'
			// 	}
			// ]
		}, 20);

		// Calendar view
		this.register('calendar', {
			name: 'VIEW_CALENDAR',
			icon: require('~/assets/img/sidebar/calendar.svg')
		}, 30);

		// Whiteboard view
		this.register('whiteboard', {
			name: 'VIEW_WHITEBOARD',
			icon: require('~/assets/img/sidebar/whiteboard.svg')
		}, 40);

	}

}

/**
 * A project view provides a specific way of insights
 * into a project.
 */
export interface ProjectView {
	name: string;
	icon: string;
}