package p.studio.workspaces.assets.messages;

import java.util.Objects;

public record AssetWorkspaceSceneBankValidation(
        AssetWorkspaceSceneBankStatus status,
        boolean pendingExternalChanges,
        boolean canAccept,
        String currentFingerprint,
        String validatedFingerprint,
        String acceptedFingerprint) {

    public static final AssetWorkspaceSceneBankValidation NOT_APPLICABLE = new AssetWorkspaceSceneBankValidation(
            AssetWorkspaceSceneBankStatus.NOT_APPLICABLE,
            false,
            false,
            "",
            "",
            "");

    public AssetWorkspaceSceneBankValidation {
        status = Objects.requireNonNullElse(status, AssetWorkspaceSceneBankStatus.NOT_APPLICABLE);
        currentFingerprint = Objects.requireNonNullElse(currentFingerprint, "");
        validatedFingerprint = Objects.requireNonNullElse(validatedFingerprint, "");
        acceptedFingerprint = Objects.requireNonNullElse(acceptedFingerprint, "");
    }
}
