import { Controller } from "@hotwired/stimulus"

export class StatusController extends Controller {
    connect() {
        window.runtime.EventsOn("set-statusbar-message", (data) => {
            this._setStatusbarMessage(data.message);
        });
    }

    _setStatusbarMessage(message) {
        this.element.textContent = message;
        this.element.classList.remove("deemphasized");
    }
}