contract FrozenRole is Context, FreezerRole {
    using Roles for Roles.Role;

    event FrozenAdded(address indexed account);
    event FrozenRemoved(address indexed account);

    Roles.Role private _frozens;

    modifier onlyFrozen() {
        require(isFrozen(_msgSender()), "FrozenRole: caller does not have the Frozen role");
        _;
    }

    function isFrozen(address account) public view returns (bool) {
        return _frozens.has(account);
    }

    function addFrozen(address account) public onlyFreezer {
        _addFrozen(account);
    }

    function removeFrozen(address account) public onlyFreezer {
        _removeFrozen(account);
    }

    // function renounceFrozen() public {
    //     _removeFrozen(_msgSender());
    // }

    function _addFrozen(address account) internal {
        _frozens.add(account);
        emit FrozenAdded(account);
    }

    function _removeFrozen(address account) internal {
        _frozens.remove(account);
        emit FrozenRemoved(account);
    }
}
function _addFrozen(address account) internal {
    _frozens.add(account);
    emit FrozenAdded(account);
}

// function renounceFrozen() public {
//     _removeFrozen(_msgSender());
// }