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

    event FinanceAdded(address indexed account);
    event FinanceRemoved(address indexed account);

    Roles.Role private _finances;
    uint256 private _financeslevel;

    constructor ()  internal {
        // addManager(msg.sender);
        _financeslevel = 5;
    }

    modifier onlyFinance()  {
        require(isFinance(msg.sender), "Finance: caller is not the finance");
        _;
    }
    function financeslevel() public view returns(uint256){
        return _financeslevel;
    }
    function isFinance(address account) public view returns (bool) {
        return _finances.has(account);
    }
    // function addManager(address account) public onlyOwner {
    //     _addManager(account);
    // }

    function renounceFinance(address account) public onlyOwner {
        _removeFinance(account);
    }

    function _addFinance(address account) internal {
        _finances.add(account);
        emit FinanceAdded(account);
    }

    function _removeFinance(address account) internal {
        _finances.remove(account);
        emit FinanceRemoved(account);
    }
}
function renounceFinance(address account) public onlyOwner {
    _removeFinance(account);
}

// function addManager(address account) public onlyOwner {
//     _addManager(account);
// }