import app from 'flarum/forum/app';
import { extend } from 'flarum/common/extend';
import NotificationGrid from 'flarum/forum/components/NotificationGrid';

export default function addTeamsSettings() {
  extend(NotificationGrid.prototype, 'notificationTypes', function (items) {

    items.add('teams-header', {
      name: 'teams-header',
      label: app.translator.trans('sbp-jm-msteams.forum.teams.header'),
      children: [],
    });

    items.add('teams-newPost', {
      name: 'teams-newPost',
      label: app.translator.trans('sbp-jm-msteams.forum.teams.newPost'),
      settings: {
        teams: 'sbp-jm-msteams.types.newPost',
      },
    });

    items.add('teams-postMentioned', {
      name: 'teams-postMentioned',
      label: app.translator.trans('sbp-jm-msteams.forum.teams.postMentioned'),
      settings: {
        teams: 'sbp-jm-msteams.types.postMentioned',
      },
    });

    items.add('teams-userMentioned', {
      name: 'teams-userMentioned',
      label: app.translator.trans('sbp-jm-msteams.forum.teams.userMentioned'),
      settings: {
        teams: 'sbp-jm-msteams.types.userMentioned',
      },
    });

  });
}