// Copyright © Selmo Technology GmbH. All Rights Reserved

using Microsoft.AspNetCore.Components;
using Radzen.Blazor;

namespace SelmoStudio.Hmi.Server.Shared.Components.BaseComponents
{
    public partial class RadialGaugeComponent
    {
        private GaugeTickPosition tickPositionEnumValue => (GaugeTickPosition)TickPosition;

        [Parameter]
        public bool ShowValue { get; set; } = true;

        [Parameter]
        public double MinValue { get; set; } = 0.0;

        [Parameter]
        public double MaxValue { get; set; } = 0.0;

        [Parameter]
        public double CurrentValue { get; set; } = 0.0;

        [Parameter]
        public int StartAngle { get; set; } = -150;

        [Parameter]
        public int EndAngle { get; set; } = 150;

        [Parameter]
        public int Step { get; set; } = 20;

        [Parameter]
        public double Radius { get; set; } = 1;

        [Parameter]
        public double PointerLength { get; set; } = 0.6;

        [Parameter]
        public string MeasuringUnit { get; set; } = string.Empty;

        /// <summary>
        /// Radial gauge tick position. Available positions: GaugeTickPosition.Inside, GaugeTickPosition.Outside, GaugeTickPosition.None
        /// </summary>
        [Parameter]
        public int TickPosition { get; set; } = (int)GaugeTickPosition.Inside;

        [Parameter]
        public List<(int from, int to, string color)> Ranges { get; set; } = new();
    }
}