using System;
using System.Collections.Generic;
using System.Windows;

namespace MainShell.Process
{
    public class WaferScanPlan
    {
        public WaferScanPlan()
        {
            PathPoints = Array.Empty<Point>();
            RawPathPoints = Array.Empty<Point>();
            FinalPathPoints = Array.Empty<Point>();
            Adjustments = Array.Empty<WaferPlannerPointAdjustment>();
        }

        public Point StartPoint { get; set; }

        public Point EndPoint { get; set; }

        public IReadOnlyList<Point> PathPoints { get; set; }

        public IReadOnlyList<Point> RawPathPoints { get; set; }

        public IReadOnlyList<Point> FinalPathPoints { get; set; }

        public WaferScanArea ScanArea { get; set; }

        public double StepX { get; set; }

        public double StepY { get; set; }

        public double OverlapX { get; set; }

        public double OverlapY { get; set; }

        public IReadOnlyList<WaferPlannerPointAdjustment> Adjustments { get; set; }

        public string PathGenerationMessage { get; set; }

        public int ScanRowCount { get; set; }

        public int ScanColumnCount { get; set; }

        public int SoftLimitAdjustedCount { get; set; }

        public int AddedCoveragePointCount { get; set; }

        public int PathPointCount
        {
            get
            {
                IReadOnlyList<Point> effectivePathPoints = FinalPathPoints ?? PathPoints;
                return effectivePathPoints == null ? 0 : effectivePathPoints.Count;
            }
        }
    }
}
