// Copyright © Selmo Technology GmbH. All Rights Reserved

using Novus.Shared.Dto;
using Novus.Shared.Id;
using SelmoStudio.Hmi.Server.SelmoHmi.Model.Ids;
using SelmoStudio.Hmi.Server.SelmoHmi.Parameter.Model.Ids;
using SelmoStudio.Hmi.Server.SelmoHmi.Plant.Model.Ids;
using SelmoStudio.Hmi.Server.SelmoHmi.Sequence.Model.Ids;
using SelmoStudio.Hmi.Common.SelmoProject.Types;
using static SelmoStudio.Hmi.Server.SelmoHmi.Shared.TestImpl.TestValuesForDemo;
using SelmoStudio.Hmi.Server.SelmoHmi.Group.Model.Ids;
using SelmoStudio.Hmi.Common.SelmoProject.Parameter;

namespace SelmoStudio.Hmi.Server.SelmoHmi.Parameter.Model.Dto
{
    public class ParameterDto : IDto
    {
        public ParameterId Id { get; init; }

        IGuidBasedId IDto.Id => Id;

        public string Name { get; init; }

        public string Description { get; init; }

        public string DefaultDisplayText { get; init; }

        public HmiPlcType PlcType { get; init; }

        //Not allowed but it is in server project
        public int Number { get; set; }

        public string HmiText { get; init; }

        public string VariableName { get; init; }

        public string VariableNameFullyQualified { get; init; }

        public int PlcStringLength { get; init; } = 80;

        public string InitialValue { get; set; }

        public string LoadedValue { get; set; }

        public bool IsNotNumeric { get; init; }

        public string Unit { get; init; }

        public bool IsTypeNotBool { get; init; }

        public ParameterType Type { get; init; }

        public double? LimitMin { get; init; }

        public double? LimitMax { get; init; }

        public int DecimalDigits { get; init; } = -1;

        public int DecimalPlace { get; init; }

        public bool HideInHmi { get; init; }

        public SequenceId ParentSequence { get; init; }

        public HardwareZoneId ParentHwZone { get; init; }

        public PlantId ParentPlant { get; init; }

        public bool IsDriverParameterConnected { get; init; }

        public string IsDriverParameterConnectedImage { get; init; }

        public string Section { get; set; }

        public string IsDriverConnectedImageToolTip { get; init; }

        public TestProcessValueInfo ProcessValueInfo { get; init; }

        public GroupId Group { get; init; }

        public HmiButtonMode ButtonMode { get; init; }

        public bool Disable { get; init; }
    }
}