Centralized method of handling toggle buttons