Use the ternary operator in the second conditional as it is used in the ...

...first.