sortedByAvailability

Returns a new list sorted by, in order:

  1. Availability for action (available first).

  2. 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.