package org.usfirst.frc.team1360.robot.util;

import com.sun.org.apache.xalan.internal.xsltc.trax.SmartTransformerFactoryImpl;
import edu.wpi.first.wpilibj.command.CommandGroup;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc.team1360.robot.autonomous.AutonomousCommand;
import org.usfirst.frc.team1360.robot.autonomous.actions.AutonomousDriveCommand;
import org.usfirst.frc.team1360.robot.autonomous.actions.AutonomousShooterCommand;
import org.usfirst.frc.team1360.robot.autonomous.groups.AutonomousBreachGroup;

import java.util.ArrayList;
import java.util.List;

public class DriverstationDashboard
{
    private static SendableChooser sendableChooser = new SendableChooser();
    private static SendableChooser directionChooser = new SendableChooser();

    private CommandData data;

    public DriverstationDashboard(CommandData data)
    {
        this.data = data;
    }


    public void initAutoSelection()
    {
        boolean first = false;
        for (AutonomousBreachGroup.Defense d : AutonomousBreachGroup.Defense.values())
        {
            if (!first)
            {
                first = true;
                sendableChooser.addDefault(d.name().replaceAll("_", " "), d);
                continue;
            }
            sendableChooser.addObject(d.name().replaceAll("_", " "), d);
        }
        directionChooser.addDefault("Forwards", AutonomousBreachGroup.Direction.FORWARDS);
        directionChooser.addObject("Reverse", AutonomousBreachGroup.Direction.REVERSE);
        SmartDashboard.putData("BreachAuto", sendableChooser);
        //SmartDashboard.putData("DirectionAuto", directionChooser);
    }

    public CommandGroup getAutoSelection()
    {
        return new AutonomousBreachGroup((AutonomousBreachGroup.Defense) sendableChooser.getSelected(), data);
    }

    public AutonomousBreachGroup.Direction getAutoDirection()
    {
        return (AutonomousBreachGroup.Direction) directionChooser.getSelected();
    }
}

@@ -773,85 +773,8 @@
 r();
-%0A    private static SendableChooser directionChooser = new SendableChooser();
 %0A%0A  
@@ -1345,301 +1345,53 @@
     
-directionChooser.addDefault(%22Forwards%22, AutonomousBreachGroup.Direction.FORWARDS);%0A        directionChooser.addObject(%22Reverse%22, AutonomousBreachGroup.Direction.REVERSE);%0A        SmartDashboard.putData(%22BreachAuto%22, sendableChooser);%0A        //SmartDashboard.putData(%22DirectionAuto%22, direction
+SmartDashboard.putData(%22BreachAuto%22, sendable
 Choo
@@ -1574,161 +1574,6 @@
  %7D%0A%0A
-    public AutonomousBreachGroup.Direction getAutoDirection()%0A    %7B%0A        return (AutonomousBreachGroup.Direction) directionChooser.getSelected();%0A    %7D%0A
 %7D%0A

Remove auto direction