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

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

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

        protected override ITransmissionFamily FindComponentFamily()
        {
            return this.Industry.FindTransmissionFamilyByName(this.FamilyName);
        }

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

    }
}
