package frc.robot.subsystems;

import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import edu.wpi.first.wpilibj2.command.WaitCommand;
import frc.robot.constants.CompressorConstants;
import frc.robot.constants.KickerConstants;

public class Kicker extends SubsystemBase {
    private Solenoid solenoid;

    public Kicker() {
        solenoid = new Solenoid(CompressorConstants.kModuleType, KickerConstants.kSolenoidPort);
        solenoid.set(true);
    }

    public Command kick() {
        return runOnce(() -> solenoid.set(false)).andThen(
            new WaitCommand(1),
            runOnce(() -> solenoid.set(true))
        );
    }
}
