Refactor action to enum