2 LED flasher with one pushbutton

I'm new in arduino. Trying to build custom motorcycle lights control.

Basicly i need one push button to do 3 functions.

1 click turn on LED1 blinking till press one more time
2 clicks turn on LED2 blinking till press one more time
3 long press turn on LED1 and LED2 to blink till next long press.

const byte buttonPin = 7;
const byte ledPin = 13;
boolean flashing = false;
byte currentButtonState = HIGH;
byte previousButtonState = HIGH;
unsigned long currentTime;
unsigned long onoffStarted;
long flashPeriod = 1000;

void setup()
{
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(ledPin, OUTPUT);
}

void loop()
{
  currentButtonState = digitalRead(buttonPin);
  if (currentButtonState != previousButtonState && currentButtonState == LOW)  //button has become pressed
  {
    flashing = !flashing;
  }
  previousButtonState = currentButtonState;          //save the button state for the next check

  if (flashing)
  {
    currentTime = millis();
    if (currentTime - onoffStarted > flashPeriod)  //if the flash period ended ?
    {
      digitalWrite(ledPin, !digitalRead(ledPin));  //flip the state of the LED
      onoffStarted = currentTime;                  //save the time when it occured
    }
  }
  else
  {
    digitalWrite(ledPin, HIGH);  //force the LED off if not flashing
  }
}

I trying to understand from basics.. so trying to play first with one function, and its working fine. how i can set second function to button for turning on second LED?

You already have a topic for this which has been locked

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.