package p.studio.workspaces.framework;

import p.studio.controls.lifecycle.StudioControlLifecycle;

public interface StudioEventAware extends StudioControlLifecycle {
    StudioEventBindings eventBindings();

    void registerEventSubscriptions();

    @Override
    default void subscribe() {
        eventBindings().activate(this::registerEventSubscriptions);
    }

    @Override
    default void unsubscribe() {
        eventBindings().clear();
    }
}
