contract Admin is Ownable {
    using Roles for Roles.Role;

    event AdminAdded(address indexed account);
    event AdminRemoved(address indexed account);

    Roles.Role private _admins;
    uint256 private _adminslevel;

    constructor ()  internal {
        // addAdmin(msg.sender);
        _adminslevel = 1;
    }

    modifier onlyAdmin()  {
        require(isAdmin(msg.sender), "Admin: caller is not the admin");
        _;
    }
    function adminslevel() public view returns(uint256){
        return _adminslevel;
    }

    function isAdmin(address account) public view returns (bool) {
        return _admins.has(account);
    }

    // function addAdmin(address account) public onlyOwner {
    //     _addAdmin(account);
    // }

    function renounceAdmin(address account) public onlyOwner {
        _removeAdmin(account);
    }

    function _addAdmin(address account) internal {
        _admins.add(account);
        emit AdminAdded(account);
    }

    function _removeAdmin(address account) internal {
        _admins.remove(account);
        emit AdminRemoved(account);
    }
}
function renounceAdmin(address account) public onlyOwner {
    _removeAdmin(account);
}

// function addAdmin(address account) public onlyOwner {
//     _addAdmin(account);
// }