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