```\nfunction changeHatToggle(uint256 _hatId, address _newToggle) external {\n    if (_newToggle == address(0)) revert ZeroAddress();\n\n    _checkAdmin(_hatId);\n    Hat storage hat = _hats[_hatId];\n\n    if (!_isMutable(hat)) {\n        revert Immutable();\n    }\n\n    hat.toggle = _newToggle;\n\n    emit HatToggleChanged(_hatId, _newToggle);\n}\n```\n