Is it possible to apply conditions to macros?
I.e.,
/cast harmful spell if targeting an enemy; friendly spell if targeting a friendly

I would like to apply two spells/abilities/actions (at least) to a keystroke.

I'm liking that I'm able to tie a specific spell with a specific ability to the same keystroke. I would like to expand on these through adding conditions to these type of macro setups.