#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 engine that encapsulates a description of its engineering characteristics as well as
    /// provides an annual historic view of its revisions.
    /// </summary>
    /// <seealso cref="BaselineEngine"/>
    /// <seealso cref="EngineFamily"/>
    [Serializable]
    public class Engine : OEMComponent<IEngineFamily>, IEngine
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Engine"/> class, using the specified baseline info.
        /// </summary>
        /// <param name="baselineInfo">
        ///     A description of engineering characteristics for this <see cref="Engine"/>.
        /// </param>
        public Engine(BaselineEngine baselineInfo) : base(baselineInfo) { }

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

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

        protected override IEngineFamily FindComponentFamily()
        {
            return this.Industry.FindEngineFamilyByName(this.FamilyName);
        }

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

    }
}
