import { Plugin } from '@tachybase/client';

import { TodoList } from './TodoList';

export class PluginTodoPageClient extends Plugin {
  async afterAdd() {
    // await this.app.pm.add()
  }

  async beforeLoad() {} // You can get and modify the app instance here

  async load() {
    this.router.add('todo', {
      path: '/todo',
      Component: TodoList,
    });
    this.app.pluginSettingsManager.add('todo', {
      title: 'todo',
      icon: 'ApiOutlined',
      Component: TodoList,
    });
  }
}

export default PluginTodoPageClient;
