namespace ClaudeDo.Ui.ViewModels.Islands;

public enum LogKind { Sys, Tool, Claude, Stdout, Stderr, Done, Msg, User }

public sealed class LogLineViewModel
{
    public required LogKind Kind { get; init; }
    public required string Text { get; init; }
    public string TimestampFormatted { get; } = DateTime.Now.ToString("HH:mm:ss");
    public string KindMarker => Kind switch
    {
        LogKind.Sys    => "sys",
        LogKind.Tool   => "tool",
        LogKind.Claude => "claude",
        LogKind.Stdout => "out",
        LogKind.Stderr => "err",
        LogKind.Done   => "done",
        LogKind.Msg    => "claude",
        LogKind.User   => "you",
        _              => "",
    };
    public string ClassName => Kind switch
    {
        LogKind.Sys    => "log-sys",
        LogKind.Tool   => "log-tool",
        LogKind.Claude => "log-claude",
        LogKind.Stdout => "log-stdout",
        LogKind.Stderr => "log-stderr",
        LogKind.Done   => "log-done",
        LogKind.Msg    => "log-msg",
        LogKind.User   => "log-user",
        _              => "",
    };
}
