contract AestheticERC1155Upgradeable is Initializable, ERC1155Upgradeable, OwnableUpgradeable, AccessControlUpgradeable, PausableUpgradeable, ERC1155BurnableUpgradeable, ERC1155SupplyUpgradeable, UUPSUpgradeable {
    bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");

    string public name;
    string public symbol;
    string public contractURI;

    // /// @custom:oz-upgrades-unsafe-allow constructor
    // constructor() initializer {}

    // function initialize(
    //   string memory _baseTokenURI,
    //   string memory _name,
    //   string memory _symbol,
    //   string memory _contractURI
    // ) initializer public {
    //   __AestheticERC1155Upgradeable_init(_baseTokenURI, _name, _symbol, _contractURI);
    // }

    function __AestheticERC1155Upgradeable_init(
      string memory _baseTokenURI,
      string memory _name,
      string memory _symbol,
      string memory _contractURI
    ) internal onlyInitializing {
        __ERC1155_init(_baseTokenURI);
        __Ownable_init();
        __AccessControl_init();
        __Pausable_init();
        __ERC1155Burnable_init();
        __ERC1155Supply_init();
        __UUPSUpgradeable_init();

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(URI_SETTER_ROLE, msg.sender);
        _grantRole(PAUSER_ROLE, msg.sender);
        _grantRole(MINTER_ROLE, msg.sender);
        _grantRole(UPGRADER_ROLE, msg.sender);

        __AestheticERC1155Upgradeable_init_unchained(_name, _symbol, _contractURI);
    }

    function __AestheticERC1155Upgradeable_init_unchained(
      string memory _name,
      string memory _symbol,
      string memory _contractURI
    ) internal onlyInitializing {
        name = _name;
        symbol = _symbol;
        contractURI = _contractURI;
    }

    function setContractURI(string memory _contractURI) public onlyOwner {
        contractURI = _contractURI;
    }

    function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {
        _setURI(newuri);
    }

    function pause() public onlyRole(PAUSER_ROLE) {
        _pause();
    }

    function unpause() public onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    function mint(address account, uint256 id, uint256 amount, bytes memory data)
        public
        onlyRole(MINTER_ROLE)
    {
        _mint(account, id, amount, data);
    }

    function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
        public
        onlyRole(MINTER_ROLE)
    {
        _mintBatch(to, ids, amounts, data);
    }

    function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
        internal
        whenNotPaused
        override(ERC1155Upgradeable, ERC1155SupplyUpgradeable)
    {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }

    function _authorizeUpgrade(address newImplementation)
        internal
        onlyRole(UPGRADER_ROLE)
        override
    {}

    // The following functions are overrides required by Solidity.

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC1155Upgradeable, AccessControlUpgradeable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    uint256[47] private __gap;
}
function __AestheticERC1155Upgradeable_init(
  string memory _baseTokenURI,
  string memory _name,
  string memory _symbol,
  string memory _contractURI
) internal onlyInitializing {
    __ERC1155_init(_baseTokenURI);
    __Ownable_init();
    __AccessControl_init();
    __Pausable_init();
    __ERC1155Burnable_init();
    __ERC1155Supply_init();
    __UUPSUpgradeable_init();

    _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    _grantRole(URI_SETTER_ROLE, msg.sender);
    _grantRole(PAUSER_ROLE, msg.sender);
    _grantRole(MINTER_ROLE, msg.sender);
    _grantRole(UPGRADER_ROLE, msg.sender);

    __AestheticERC1155Upgradeable_init_unchained(_name, _symbol, _contractURI);
}

// /// @custom:oz-upgrades-unsafe-allow constructor
// constructor() initializer {}
// function initialize(
//   string memory _baseTokenURI,
//   string memory _name,
//   string memory _symbol,
//   string memory _contractURI
// ) initializer public {
//   __AestheticERC1155Upgradeable_init(_baseTokenURI, _name, _symbol, _contractURI);
// }