Implement toggling based on current state.