Press and hold a button for 2 seconds and it flashes

Hello
I guess the sketch needs a FSM for the differend stages and two timers at least.
Please post your sketch well formated and in code tags "</>"> to be found in this editor.