contract ERC721Mintable is ERC721, MinterRole {

    bool public anyoneCanMint;
    
    /**
     * @dev Options to activate or deactivate mint ability
     */

    function _setMintableOption(bool _anyoneCanMint) internal {
        anyoneCanMint = _anyoneCanMint;
    }

    /**
     * @dev Function to mint tokens.
     * @param to The address that will receive the minted tokens.
     * @param tokenId The token id to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(address to, uint256 tokenId)
        public
        onlyMinter
        returns (bool)
    {
        _mint(to, tokenId);
        return true;
    }

    function canIMint() public view returns (bool) {
        return anyoneCanMint || isMinter(msg.sender);
    }

    /**
     * Open modifier to anyone can mint possibility
     */
    modifier onlyMinter() {
        string memory mensaje;
        require(
            canIMint(),
            "MinterRole: caller does not have the Minter role"
        );
        _;
    }

}
/**
 * @title ERC721Mintable
 * @dev ERC721 minting logic.
 */
function _setMintableOption(bool _anyoneCanMint) internal {
    anyoneCanMint = _anyoneCanMint;
}

/**
 * @dev Options to activate or deactivate mint ability
 */