contract Closable is Context, CloserRole {
    /**
     * @dev Emitted when the close is triggered by a closer (`account`).
     */
    event Closed(address account);

    /**
     * @dev Emitted when the close is lifted by a closer (`account`).
     */
    // event Unclosed(address account);

    bool private _closed;

    /**
     * @dev Initializes the contract in unclosed state. Assigns the Closer role
     * to the deployer.
     */
    constructor () internal {
        _closed = false;
    }

    /**
     * @dev Returns true if the contract is closed, and false otherwise.
     */
    function closed() public view returns (bool) {
        return _closed;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not closed.
     */
    modifier whenNotClosed() {
        require(!_closed, "Closable: closed");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is closed.
     */
    modifier whenClosed() {
        require(_closed, "Closable: not closed");
        _;
    }

    /**
     * @dev Called by a closer to close, triggers stopped state.
     */
    function close() public onlyCloser whenNotClosed {
        _closed = true;
        emit Closed(_msgSender());
    }

    /**
     * @dev Called by a closer to unclose, returns to normal state.
     */
    // function unclose() public onlyCloser whenClosed {
    //     _closed = false;
    //     emit Unclosed(_msgSender());
    // }
}
/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotClosed` and `whenClosed`, which can be applied to
 * the functions of your contract. Note that they will not be closable by
 * simply including this module, only once the modifiers are put in place.
 */
function closed() public view returns (bool) {
        return _closed;
    }
/**
 * @dev Returns true if the contract is closed, and false otherwise.
 */