using Microsoft.AspNetCore.Components;
using MudBlazor;

namespace DeepDrftPublic.Client.Controls.AudioPlayerBar;

public partial class VolumeZone : ComponentBase
{
    [Parameter] public string? Class { get; set; }
    [Parameter] public required double Volume { get; set; }
    [Parameter] public required EventCallback<double> VolumeChanged { get; set; }
    private string GetVolumeIcon()
    {
        if (Volume == 0) return Icons.Material.Filled.VolumeOff;
        if (Volume < 0.5) return Icons.Material.Filled.VolumeDown;
        return Icons.Material.Filled.VolumeUp;
    }
}