sortedByAvailability
Returns a new list sorted by, in order:
Availability for action (available first).
Universal commands (
set != "moderation_set") before contextual ones.
The sort is stable, so within each group the input order is preserved.
Parameters
action
The composer action currently active, or null when the composer is in its default state.