"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DISCRIMINATOR = void 0;
exports.withdrawQueuedLiquidity = withdrawQueuedLiquidity;
/* eslint-disable @typescript-eslint/no-unused-vars */
const kit_1 = require("@solana/kit");
const programId_1 = require("../programId");
exports.DISCRIMINATOR = Buffer.from([66, 149, 187, 201, 74, 191, 174, 120]);
function withdrawQueuedLiquidity(accounts, remainingAccounts = [], programAddress = programId_1.PROGRAM_ID) {
    const keys = [
        { address: accounts.payer.address, role: 3, signer: accounts.payer },
        { address: accounts.lendingMarket, role: 0 },
        { address: accounts.lendingMarketAuthority, role: 0 },
        { address: accounts.reserve, role: 1 },
        { address: accounts.reserveLiquidityMint, role: 0 },
        { address: accounts.reserveCollateralMint, role: 1 },
        { address: accounts.reserveLiquiditySupply, role: 1 },
        { address: accounts.ownerQueuedCollateralVault, role: 1 },
        { address: accounts.userDestinationLiquidity, role: 1 },
        { address: accounts.collateralTokenProgram, role: 0 },
        { address: accounts.liquidityTokenProgram, role: 0 },
        { address: accounts.withdrawTicket, role: 1 },
        { address: accounts.withdrawTicketOwner, role: 1 },
        { address: accounts.associatedTokenProgram, role: 0 },
        { address: accounts.systemProgram, role: 0 },
        (0, kit_1.isSome)(accounts.progressCallbackProgram)
            ? { address: accounts.progressCallbackProgram.value, role: 0 }
            : { address: programAddress, role: 0 },
        (0, kit_1.isSome)(accounts.progressCallbackCustomAccount0)
            ? { address: accounts.progressCallbackCustomAccount0.value, role: 0 }
            : { address: programAddress, role: 0 },
        (0, kit_1.isSome)(accounts.progressCallbackCustomAccount1)
            ? { address: accounts.progressCallbackCustomAccount1.value, role: 0 }
            : { address: programAddress, role: 0 },
        { address: accounts.instructionSysvarAccount, role: 0 },
        ...remainingAccounts,
    ];
    const data = exports.DISCRIMINATOR;
    const ix = { accounts: keys, programAddress, data };
    return ix;
}
//# sourceMappingURL=withdrawQueuedLiquidity.js.map