using ytLive.Helpers;
namespace ytLive.ViewModels;
///
/// The entitlement surface: whether this session may emit output above the free budget.
///
/// Deliberately a separate partial from License.cs: that file owns *how* a
/// licence is validated (Polar today), this one owns *what the answer means* for output.
/// Steam's DLC check and Polar's lease both collapse into ; nothing
/// downstream of cares which one proved it.
///
public partial class MainViewModel
{
///
/// The single input to .
///
/// Fail closed: an unresolved or unreadable licence is simply false, so a
/// build with no entitlement emits the free profile. There is no "unknown" branch to get
/// wrong.
///
/// Developer mode never ships: is only ever
/// settable inside a development build (see ), so this expression
/// reduces to IsPremium in a Release binary.
///
public bool HasProOutput => IsPremium || DeveloperMode;
private bool _developerMode;
///
/// Development-only override: ignore the output budget and allow every shipped tier.
///
/// There is no UI to reach this in a Release build — the panel that hosts the
/// checkbox is excluded from the Release compile — and the setter refuses the value
/// unless is true, so even a hand-edited settings
/// file cannot unlock it.
///
public bool DeveloperMode
{
get => _developerMode;
set
{
if (!DevBuild.IsDevelopment) return;
if (!SetProperty(ref _developerMode, value)) return;
OnPropertyChanged(nameof(HasProOutput));
}
}
}