using Avalonia;
using Avalonia.Controls;
using InABox.Avalonia.Converters;

namespace InABox.Avalonia.Theme.Classes;

public class TabItemHeaderMarginConverter : AbstractConverter<Dock, Thickness>
{
    public double Padding { get; set; } = 2.0;

    protected override Thickness Convert(Dock value, object? parameter = null)
    {
        return value == Dock.Bottom 
            ? new Thickness(0, Padding, 0, 0)
            : value == Dock.Top 
                ? new Thickness(0, 0, 0, Padding)
                : value == Dock.Left 
                    ? new Thickness(0, 0, Padding, 0)
                    : new Thickness(Padding, 0, 0, 0);
    }
}