import EventEmitter from 'eventemitter3';

import type { Service } from '../types';

/** Event bus service used to decouple controllers and views. */
export default class Events extends EventEmitter implements Service
{
    public name = 'Events';
    public readonly serviceType = 'events';

    public dispose(): void
    {
        this.removeAllListeners();
    }
}
