#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

using System;
using System.Collections.Generic;

using Volpe.Cafe.MarketData.BaselineInfo;
using Volpe.Cafe.MarketData.Design;

namespace Volpe.Cafe.MarketData
{
    /// <summary>
    /// Represents a vehicle platform that encapsulates a description of its engineering characteristics as well as
    /// provides an annual historic view of its revisions.
    /// </summary>
    /// <seealso cref="BaselinePlatform"/>
    /// <seealso cref="PlatformFamily"/>
    [Serializable]
    public class Platform : OEMComponent<IPlatformFamily>, IPlatform
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Platform"/> class, using the specified baseline info.
        /// </summary>
        /// <param name="baselineInfo">
        ///     A description of engineering characteristics for this <see cref="Platform"/>.
        /// </param>
        public Platform(BaselinePlatform baselineInfo) : base(baselineInfo) { }

        public override int[] TechnologyList => TechnologyIndexes.PlatformLevel;

        public new BaselinePlatform BaselineInfo => (BaselinePlatform)base.BaselineInfo;

        protected override IPlatformFamily FindComponentFamily()
        {
            return this.Industry.FindPlatformFamilyByName(this.FamilyName);
        }

        protected override List<IVehicle> FindComponentVehicles()
        {
            return this.Industry.FindVehiclesByPlatformCode(this.Code);
        }

    }
}
