using System.Collections.Generic;
using RobocraftX.Blocks;
using RobocraftX.PilotSeat;
using Techblox.EngineBlock;
using Techblox.WheelRigBlock;

namespace CodeGenerator
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var bcg = new BlockClassGenerator();
            bcg.Generate("Engine", null, new Dictionary<string, string>
            {
                { "engineOn", "On" }
            }, typeof(EngineBlockComponent), // Simulation time properties
                typeof(EngineBlockTweakableComponent), typeof(EngineBlockReadonlyComponent));
            bcg.Generate("DampedSpring", "DAMPEDSPRING_BLOCK_GROUP", new Dictionary<string, string>
                {
                    {"maxExtent", "MaxExtension"}
                },
                typeof(TweakableJointDampingComponent), typeof(DampedSpringReadOnlyStruct));
            bcg.Generate("LogicGate", "LOGIC_BLOCK_GROUP");
            bcg.Generate("Servo", types: typeof(ServoReadOnlyStruct), renames: new Dictionary<string, string>
            {
                {"minDeviation", "MinimumAngle"},
                {"maxDeviation", "MaximumAngle"},
                {"servoVelocity", "MaximumForce"}
            });
            bcg.Generate("WheelRig", "WHEELRIG_BLOCK_BUILD_GROUP", null,
                typeof(WheelRigTweakableStruct), typeof(WheelRigReadOnlyStruct),
                typeof(WheelRigSteerableTweakableStruct), typeof(WheelRigSteerableReadOnlyStruct));
            bcg.Generate("Seat", "RobocraftX.PilotSeat.SeatGroups.PILOTSEAT_BLOCK_BUILD_GROUP", null, typeof(SeatFollowCamComponent), typeof(SeatReadOnlySettingsComponent));
            bcg.Generate("Piston", null, new Dictionary<string, string>
            {
                {"pistonVelocity", "MaximumForce"}
            }, typeof(PistonReadOnlyStruct));
        }
    }
}