package p.studio.controls.shell;

import java.util.Objects;

public record StudioActivityEntry(
        String source,
        String message,
        StudioActivityEntrySeverity severity,
        boolean sticky) {

    public StudioActivityEntry {
        source = Objects.requireNonNull(source, "source").trim();
        message = Objects.requireNonNull(message, "message").trim();
        Objects.requireNonNull(severity, "severity");
        if (source.isBlank() || message.isBlank()) {
            throw new IllegalArgumentException("source and message must not be blank");
        }
    }
}
