using System.Text.Json.Serialization;

namespace TodoList.Maui.Models;

public class AppSettings
{
    [JsonPropertyName("WebServer")]
    public WebServerSettings WebServer { get; set; } = new();

    [JsonPropertyName("HotKey")]
    public HotKeyDefaultSettings HotKey { get; set; } = new();
}

public class WebServerSettings
{
    [JsonPropertyName("Port")]
    public int Port { get; set; } = 5057;

    [JsonPropertyName("IsUsingStatic")]
    public bool IsUsingStatic { get; set; } = true;

    [JsonPropertyName("ConnectionString")]
    public string ConnectionString { get; set; } = "";


    [JsonPropertyName("HostUrl")]
    public string HostUrl { get; set; } = "http://localhost:5057";


    [JsonPropertyName("ForEndUrl")]
    public string ForEndUrl { get; set; } = "http://localhost:5174";
}

public class HotKeyDefaultSettings
{
    [JsonPropertyName("DefaultModifiers")]
    public string DefaultModifiers { get; set; } = "Alt";

    [JsonPropertyName("DefaultKey")]
    public string DefaultKey { get; set; } = "X";

    [JsonPropertyName("DefaultIsEnabled")]
    public bool DefaultIsEnabled { get; set; } = true;
}
