import { EventBus } from "./EventBus.js";
class AutopilotChatInternalService {
    static instance;
    eventBus;
    constructor(){
        this.eventBus = new EventBus();
    }
    static Instantiate() {
        if (!AutopilotChatInternalService.instance) AutopilotChatInternalService.instance = new AutopilotChatInternalService();
        return AutopilotChatInternalService.instance;
    }
    static get Instance() {
        return AutopilotChatInternalService.instance;
    }
    on(event, handler) {
        return this.eventBus.subscribe(event, handler);
    }
    publish(event, data) {
        this.eventBus.publish(event, data);
    }
}
export { AutopilotChatInternalService };
