package p.studio.workspaces;

import p.studio.Container;
import p.studio.controls.lifecycle.StudioControlLifecycle;
import p.studio.lsp.events.StudioWorkspaceEventBus;
import p.studio.projects.ProjectReference;
import p.studio.utilities.i18n.I18n;

import java.util.List;

public abstract class Workspace {
    protected final ProjectReference projectReference;
    protected final StudioWorkspaceEventBus workspaceEventBus;

    public Workspace(final ProjectReference projectReference) {
        this.projectReference = projectReference;
        this.workspaceEventBus = new StudioWorkspaceEventBus(workspaceId(), Container.eventBus());
    }

    public abstract WorkspaceId workspaceId();
    public abstract I18n title();
    public abstract javafx.scene.Node rootNode();
    public abstract void load();
    public abstract void unLoad();

    public List<StudioControlLifecycle> lifecycleParticipants() {
        return List.of();
    }
}
