using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;

namespace MainShell.EventArgsFolder
{
    public sealed class OriginCalibDataChangedEventArgs
    {
        public OriginCalibDataChangedEventArgs(IReadOnlyList<OriginCalibAxisOffsetChangedItem> axes)
        {
            Axes = new ReadOnlyCollection<OriginCalibAxisOffsetChangedItem>((axes ?? Array.Empty<OriginCalibAxisOffsetChangedItem>()).ToList());
        }

        public IReadOnlyList<OriginCalibAxisOffsetChangedItem> Axes { get; private set; }
    }

    public sealed class OriginCalibAxisOffsetChangedItem
    {
        public OriginCalibAxisOffsetChangedItem(string axisName, double offset)
        {
            AxisName = axisName ?? string.Empty;
            Offset = offset;
        }

        public string AxisName { get; private set; }

        public double Offset { get; private set; }
    }
}
