contract PumpkinHedzOGBadge is ERC1155Burnable, Ownable {
    
    bool public reserved;
    bool public mintStarted;
    uint256 maxSupply = 500;

    mapping(address => uint256) minted;
    
    constructor(string memory uri) ERC1155(uri) {
    }

    /**
     * @dev Gets the token name
     * @return string representing the token name
     */
    function name() external pure returns(string memory) {
        return "Pumpkin Hedz OG Badge";
    }

    /**
     * @dev Gets the token symbol
     * @return string representing the token symbol
     */
    function symbol() external pure returns(string memory) {
        return "PHOGB";
    }

    function flipMint() external onlyOwner {
        mintStarted = !mintStarted;
    }

    function reserveBadge(address reciever, uint256[] calldata ids, uint256[] calldata amounts) external onlyOwner {
        require(!reserved,"Cannot reserve Badges multiple time");

        _mintBatch(reciever, ids, amounts, "");
        reserved = true;
    }

    function setBaseURI(string memory baseURI) external onlyOwner {
        _setURI(baseURI);
    }

    function withdraw() external onlyOwner {
        uint balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    /**
    * Mints Hedz OG Badge
    */
    function mintBadge() public {
        require(mintStarted, "OG Bagde minting not started");
        require(minted[msg.sender] != 1, "Only one OG Badge per address is allowed");
        require(ERC1155.totalSupply+1 <= maxSupply, "Mint will exceed max supply");

        minted[msg.sender] = 1;
        _mint(msg.sender, ERC1155.totalSupply, 1,"");
    }
}
function name() external pure returns(string memory) {
    return "Pumpkin Hedz OG Badge";
}

/**
 * @dev Gets the token name
 * @return string representing the token name
 */