"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bosonVoucherIface = void 0;
exports.encodeBurnPremintedVouchers = encodeBurnPremintedVouchers;
exports.encodeGetAvailablePreMints = encodeGetAvailablePreMints;
exports.decodeGetAvailablePreMints = decodeGetAvailablePreMints;
exports.encodeIsApprovedForAll = encodeIsApprovedForAll;
exports.decodeIsApprovedForAll = decodeIsApprovedForAll;
exports.encodeGetRangeByOfferId = encodeGetRangeByOfferId;
exports.decodeGetRangeByOfferId = decodeGetRangeByOfferId;
exports.encodePreMint = encodePreMint;
exports.encodeSetApprovalForAll = encodeSetApprovalForAll;
exports.encodeTransferFrom = encodeTransferFrom;
exports.encodeCallExternalContract = encodeCallExternalContract;
exports.encodeSetApprovalForAllToContract = encodeSetApprovalForAllToContract;
exports.encodeWithdrawToProtocol = encodeWithdrawToProtocol;
exports.encodeSetContractURI = encodeSetContractURI;
exports.encodeOwner = encodeOwner;
exports.decodeOwner = decodeOwner;
exports.encodeIsTrustedForwarder = encodeIsTrustedForwarder;
exports.decodeIsTrustedForwarder = decodeIsTrustedForwarder;
const common_1 = require("@bosonprotocol/common");
const abi_1 = require("@ethersproject/abi");
exports.bosonVoucherIface = new abi_1.Interface(common_1.abis.IBosonVoucherABI);
function encodeBurnPremintedVouchers(offerId, amount) {
    return exports.bosonVoucherIface.encodeFunctionData("burnPremintedVouchers", [
        offerId,
        amount
    ]);
}
function encodeGetAvailablePreMints(offerId) {
    return exports.bosonVoucherIface.encodeFunctionData("getAvailablePreMints", [
        offerId
    ]);
}
function decodeGetAvailablePreMints(result) {
    return exports.bosonVoucherIface.decodeFunctionResult("getAvailablePreMints", result);
}
function encodeIsApprovedForAll(owner, operator) {
    return exports.bosonVoucherIface.encodeFunctionData("isApprovedForAll", [
        owner,
        operator
    ]);
}
function decodeIsApprovedForAll(result) {
    return exports.bosonVoucherIface.decodeFunctionResult("isApprovedForAll", result);
}
function encodeGetRangeByOfferId(offerId) {
    return exports.bosonVoucherIface.encodeFunctionData("getRangeByOfferId", [offerId]);
}
function decodeGetRangeByOfferId(result) {
    return exports.bosonVoucherIface.decodeFunctionResult("getRangeByOfferId", result);
}
function encodePreMint(offerId, amount) {
    return exports.bosonVoucherIface.encodeFunctionData("preMint", [offerId, amount]);
}
function encodeSetApprovalForAll(operator, approved) {
    return exports.bosonVoucherIface.encodeFunctionData("setApprovalForAll", [
        operator,
        approved
    ]);
}
function encodeTransferFrom(from, to, tokenId) {
    return exports.bosonVoucherIface.encodeFunctionData("transferFrom", [
        from,
        to,
        tokenId
    ]);
}
function encodeCallExternalContract(to, data) {
    return exports.bosonVoucherIface.encodeFunctionData("callExternalContract", [
        to,
        data
    ]);
}
function encodeSetApprovalForAllToContract(operator, approved) {
    return exports.bosonVoucherIface.encodeFunctionData("setApprovalForAllToContract", [
        operator,
        approved
    ]);
}
function encodeWithdrawToProtocol(tokenList) {
    return exports.bosonVoucherIface.encodeFunctionData("withdrawToProtocol", [
        tokenList
    ]);
}
function encodeSetContractURI(contractURI) {
    return exports.bosonVoucherIface.encodeFunctionData("setContractURI", [contractURI]);
}
const ownableIface = new abi_1.Interface([
    {
        inputs: [],
        name: "owner",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address"
            }
        ],
        stateMutability: "view",
        type: "function"
    }
]);
function encodeOwner() {
    return ownableIface.encodeFunctionData("owner");
}
function decodeOwner(result) {
    const [owner] = ownableIface.decodeFunctionResult("owner", result);
    return owner;
}
const eRC2771ContextIface = new abi_1.Interface([
    {
        inputs: [
            {
                internalType: "address",
                name: "forwarder",
                type: "address"
            }
        ],
        name: "isTrustedForwarder",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            }
        ],
        stateMutability: "view",
        type: "function"
    }
]);
function encodeIsTrustedForwarder(forwarder) {
    return eRC2771ContextIface.encodeFunctionData("isTrustedForwarder", [
        forwarder
    ]);
}
function decodeIsTrustedForwarder(result) {
    const [isTrustedForwarder] = eRC2771ContextIface.decodeFunctionResult("isTrustedForwarder", result);
    return isTrustedForwarder;
}
//# sourceMappingURL=interface.js.map