using Moli.Desktop.Layout; using Moli.Desktop.Plugins; namespace Moli.Desktop.Configuration; public sealed record StartupSettings { public bool StartWithWindows { get; init; } public bool StartMinimized { get; init; } = true; } public sealed record RuntimeSettings { public int ApiPort { get; init; } = 8765; public bool SafeInputMode { get; init; } public bool EditMode { get; init; } } public sealed record AppSettingsDocument { public int SchemaVersion { get; init; } = 1; public StartupSettings Startup { get; init; } = new(); public RuntimeSettings Runtime { get; init; } = new(); } public sealed record PluginRegistryItem { public required PluginId Id { get; init; } public PluginState State { get; init; } = PluginState.Enabled; public DateTimeOffset UpdatedAt { get; init; } = DateTimeOffset.UtcNow; } public sealed record PluginRegistryDocument { public int SchemaVersion { get; init; } = 1; public List Plugins { get; init; } = []; } public sealed record MonitorInfo { public required MonitorId Id { get; init; } public required RectD Bounds { get; init; } public required RectD WorkArea { get; init; } public bool IsPrimary { get; init; } public double Scale { get; init; } = 1; } public sealed record MonitorSnapshot { public DateTimeOffset CapturedAt { get; init; } = DateTimeOffset.UtcNow; public List Monitors { get; init; } = []; } public sealed record WidgetLayout { public required WidgetInstanceId InstanceId { get; init; } public required PluginId PluginId { get; init; } public required MonitorId MonitorId { get; init; } public required RectD Bounds { get; init; } public bool IsVisible { get; init; } = true; public bool IsLocked { get; init; } public double Opacity { get; init; } = 1; public bool ClickThrough { get; init; } = true; public double Scale { get; init; } = 1; public DisplayLayer DisplayLayer { get; init; } = DisplayLayer.Desktop; } public sealed record LayoutDocument { public int SchemaVersion { get; init; } = 1; public List Monitors { get; init; } = []; public List Instances { get; init; } = []; } public sealed record ConfigurationSnapshot { public AppSettingsDocument AppSettings { get; init; } = new(); public PluginRegistryDocument Plugins { get; init; } = new(); public LayoutDocument Layout { get; init; } = new(); }