package frc.robot.subsystems;

import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.constants.ClimberConstants;
import frc.robot.constants.CompressorConstants;

public class Climber extends SubsystemBase {
    private DoubleSolenoid solenoid;

    public Climber() {
        solenoid = new DoubleSolenoid(
            CompressorConstants.kModuleType, 
            ClimberConstants.kSolenoidForwardPort, 
            ClimberConstants.kSolenoidReversePort
        );

        solenoid.set(Value.kReverse);
    }
    
    public Command climberUp() {
        return runOnce(() -> solenoid.set(Value.kForward));
    }

    public Command climberDown() {
        return runOnce(() -> solenoid.set(Value.kReverse));
    }
}
