package p.studio.workspaces.assets.messages;

import java.util.List;
import java.util.Objects;

public record AssetListGroup(String label, List<AssetWorkspaceAssetSummary> assets) {
    public AssetListGroup {
        label = Objects.requireNonNull(label, "label").trim();
        assets = List.copyOf(Objects.requireNonNull(assets, "assets"));
        if (label.isBlank()) {
            throw new IllegalArgumentException("group label must not be blank");
        }
    }
}
