contract Einform is Context, ERC721Enumerable, ERC721Burnable, Ownable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdTracker;

    string private _baseTokenURI;
    
    uint private constant maxEinforms = 1000;
    uint private constant mintPrice = 50000000000000000;
    bool private paused = false;
    
    event CreateEinform(uint indexed id);
    
    mapping(uint => uint) private cardsMap;

    constructor() ERC721("Einform", "Einform") {
        _baseTokenURI = "";
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }
    
    function setBaseURI(string memory baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    function mint(uint amount) public payable {
        require(!paused || msg.sender == owner());
        require(amount > 0 && amount < 11, "You have to mint between 1 and 10 Einforms.");
        require(msg.value == mintPrice*amount || msg.sender == owner(), "It costs 0.05 eth to mint an Einform.");
        require(_tokenIdTracker.current() + amount < maxEinforms, "There can only be 999 Einforms!");
        for(uint i = 0; i < amount; i++) {
            _tokenIdTracker.increment();
            _mint(msg.sender, _tokenIdTracker.current());
            emit CreateEinform(_tokenIdTracker.current());
        }
    }

    function pause() public virtual onlyOwner {
        paused = true;
    }

    function unpause() public virtual onlyOwner {
        paused = false;
    }
    
    function withdraw() external onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
    return super.supportsInterface(interfaceId);
}

/**
 * @dev See {IERC165-supportsInterface}.
 */