package p.studio.workspaces.assets.scene;

import p.packer.dtos.PackerDiagnosticDTO;
import p.studio.workspaces.assets.messages.AssetWorkspaceSceneBankValidation;

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

public record SceneBankWorkflowResult(
        boolean success,
        String message,
        AssetWorkspaceSceneBankValidation validation,
        List<PackerDiagnosticDTO> diagnostics) {

    public SceneBankWorkflowResult {
        message = Objects.requireNonNullElse(message, "");
        validation = Objects.requireNonNullElse(validation, AssetWorkspaceSceneBankValidation.NOT_APPLICABLE);
        diagnostics = List.copyOf(Objects.requireNonNullElse(diagnostics, List.of()));
    }
}
