Moonkin macro using rake and starsurge?

Not even sure where to start with this complex macro, but I’m trying to create one that uses rake when I’m stealthed in cat form and starsurge when I’m in moonkin form. Is there a way to combine that into a single macro?

#showtooltip
/cast [form:2] Rake; Starsurge

These are a bit dated at this point but can still serve as examples: