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

export class UserSettingsRegistry extends AbstractRegistry<UserSettingsTab> {

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

		// Profile tab
		this.register('account', {
			name: 'SETTINGS_TAB_PROFILE',
			desc: 'Manage your account details',
			icon: 'mdi mdi-account'
		}, 0);

		// Appearance tab
		this.register('appearance', {
			name: 'SETTINGS_TAB_APPEARANCE',
			desc: 'Customize the appearance of Vindigo',
			icon: 'mdi mdi-eye'
		}, 10);

		// Notifications tab
		this.register('notifications', {
			name: 'SETTINGS_TAB_NOTIFICATION',
			desc: 'Choose which notifications to receieve',
			icon: 'mdi mdi-bell'
		}, 20);
	}

}

/**
 * A user setting tab represents a single section within
 * the user settings page.
 */
export interface UserSettingsTab {
	name: string;
	desc: string;
	icon: string;
}