package p.studio.workspaces.assets.messages;

import p.packer.messages.assets.AssetAction;

import java.util.Objects;

public record AssetWorkspaceAssetAction(
        AssetAction action,
        boolean enabled,
        boolean visible,
        String reason) {

    public AssetWorkspaceAssetAction {
        Objects.requireNonNull(action, "action");
        reason = reason == null ? null : reason.trim();
        if (reason != null && reason.isBlank()) {
            reason = null;
        }
    }
}
