contract GrouchyTigerCubs is ERC721, ERC721Enumerable, ERC721Burnable, Ownable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;
    uint256 public cost = 0.01 ether;

    constructor() ERC721("GrouchyTigerCubs", "GTSCC") {}

    function _baseURI() internal pure override returns (string memory) {
        return "https://grouchytigersocialclub.com/cubs/metadata/";
    }

    function safeMint(address to) public payable {
        uint256 tokenId = _tokenIdCounter.current();

        require(msg.value >= cost);

        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }

    function setCost(uint256 _newCost) public onlyOwner {
        cost = _newCost;
    }

    // The following functions are overrides required by Solidity.

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

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
    
    function withdraw() public payable onlyOwner {
        (bool success, ) = payable(msg.sender).call{
            value: address(this).balance
        }("");
        require(success);
    }
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
    internal
    override(ERC721, ERC721Enumerable)
{
    super._beforeTokenTransfer(from, to, tokenId);
}

// The following functions are overrides required by Solidity.