contract GmUkraine is ERC721Enumerable, Ownable {
    bool public mintingActive = true;
    string private currentBaseURI;

    constructor() ERC721("GmUkraine", "gmUKR") {}

    /** @dev Donate eth to mint a token
     */
    function donate(uint256 tokenId) public payable {
        require(mintingActive, "Minting is not active");
        require(msg.value >= 0.01 ether, "The minimum donation is 0.01 ETH");
        require(!_exists(tokenId), "Token already exists");
        /// mint the token
        _safeMint(msg.sender, tokenId);
    }

    /** @dev Donates ETH
    Donate all ETH in the contract to a particular wallet
    This address is not hard-coded in case it needs to change
    (There becomes a better source of donations, or the recipient changes wallet)
     */
    function transferEth(address to) public onlyOwner {
        uint256 balance = address(this).balance;
        (bool success, ) = payable(to).call{value: balance}("");
        require(success, "Donation failed");
    }

    /**
     * @dev Set the contract's state
     */
    function toggleMintingActive() public onlyOwner {
        mintingActive = !mintingActive;
    }

    /** @dev Update the base URI
     * @param baseURI_ New value of the base URI
     */
    function setBaseURI(string memory baseURI_) public onlyOwner {
        currentBaseURI = baseURI_;
    }

    /** @dev Get the current base URI
     * @return currentBaseURI
     */
    function _baseURI() internal view virtual override returns (string memory) {
        return currentBaseURI;
    }
}
/** @title GmUkraine */
function _baseURI() internal view virtual override returns (string memory) {
    return currentBaseURI;
}

/** @dev Get the current base URI
 * @return currentBaseURI
 */