package p.packer.models;

import p.packer.messages.assets.AssetAction;

import java.util.Objects;

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

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