package p.studio.workspaces.assets.messages;

import p.studio.workspaces.assets.AssetWorkspaceState;

import java.util.Objects;

public record AssetListViewState(
        AssetWorkspaceState workspaceState,
        AssetListProjection projection,
        String message) {

    public AssetListViewState {
        Objects.requireNonNull(workspaceState, "workspaceState");
        Objects.requireNonNull(message, "message");
    }

    public boolean hasProjection() {
        return projection != null && !projection.isEmpty();
    }
}
