using Ehwrj.App.ViewModels;

namespace Ehwrj.App.Models;

public sealed class MapSettings : ObservableObject
{
    private bool _showLabels = true;
    private bool _showAircraftMach = true;
    private bool _followPlayer = true;
    private bool _rotateWithPlayer;
    private bool _showRangeRings = true;
    private bool _showBattleLog = true;
    private bool _showDeliveryTracker = true;
    private double _deliveryTrackerAngle = 0.8;

    public bool ShowLabels
    {
        get => _showLabels;
        set => SetProperty(ref _showLabels, value);
    }

    public bool ShowAircraftMach
    {
        get => _showAircraftMach;
        set => SetProperty(ref _showAircraftMach, value);
    }

    public bool FollowPlayer
    {
        get => _followPlayer;
        set => SetProperty(ref _followPlayer, value);
    }

    public bool RotateWithPlayer
    {
        get => _rotateWithPlayer;
        set => SetProperty(ref _rotateWithPlayer, value);
    }

    public bool ShowRangeRings
    {
        get => _showRangeRings;
        set => SetProperty(ref _showRangeRings, value);
    }

    public bool ShowBattleLog
    {
        get => _showBattleLog;
        set => SetProperty(ref _showBattleLog, value);
    }

    public bool ShowDeliveryTracker
    {
        get => _showDeliveryTracker;
        set => SetProperty(ref _showDeliveryTracker, value);
    }

    public double DeliveryTrackerAngle
    {
        get => _deliveryTrackerAngle;
        set => SetProperty(ref _deliveryTrackerAngle, Math.Clamp(value, 0.1, 1.0));
    }

    public void Reset()
    {
        ShowLabels = true;
        ShowAircraftMach = true;
        FollowPlayer = true;
        RotateWithPlayer = false;
        ShowRangeRings = true;
        ShowBattleLog = true;
        ShowDeliveryTracker = true;
        DeliveryTrackerAngle = 0.8;
    }
}

