namespace ytLive.Models;
/// What the top bar's primary action button will do.
public enum SessionStartKind
{
Record,
Live,
Test,
}
/// Creator ruling (2026-10-30): the primary button is context-sensitive, so the separate
/// TEST button is gone.
///
///
/// - EDIT off + ON-AIR armed → Go Live (the livestream message)
/// - EDIT on + ON-AIR armed → Test Stream (the test-livestream message) — a dry run you
/// cannot leak, because every broadcast is private pre-v1 anyway
/// - REC armed → Start Recording, whatever EDIT says (there is no test recording)
///
///
/// Pure so the whole matrix is testable without a window.
public static class SessionStartDecision
{
public static SessionStartKind For(bool recordArmed, bool onAirArmed, bool editing)
{
// Neither pill armed still starts something: local recording needs no account, and the
// no-dead-ends rule forbids an inert primary button.
if (recordArmed || !onAirArmed) return SessionStartKind.Record;
return editing ? SessionStartKind.Test : SessionStartKind.Live;
}
public static string LabelFor(SessionStartKind kind) => kind switch
{
SessionStartKind.Record => "Start Recording",
SessionStartKind.Test => "Test Stream",
_ => "Go Live",
};
}