package p.studio.workspaces.assets.messages.events;

import p.packer.messages.AssetReference;
import p.studio.lsp.events.StudioEvent;

import java.util.Objects;

public record StudioAssetBankCompositionDraftChangedEvent(
        AssetReference assetReference,
        boolean editing,
        boolean dirty,
        int availableCount,
        int selectedCount) implements StudioEvent {

    public StudioAssetBankCompositionDraftChangedEvent {
        Objects.requireNonNull(assetReference, "assetReference");
        if (availableCount < 0 || selectedCount < 0) {
            throw new IllegalArgumentException("counts must be non-negative");
        }
    }
}
