"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LPosCommand = void 0;
const command_js_1 = require("./command.js");
/**
 * @see https://redis.io/commands/lpos
 */
class LPosCommand extends command_js_1.Command {
    constructor(cmd, opts) {
        const args = ["lpos", cmd[0], cmd[1]];
        if (typeof cmd[2]?.rank === "number") {
            args.push("rank", cmd[2].rank);
        }
        if (typeof cmd[2]?.count === "number") {
            args.push("count", cmd[2].count);
        }
        if (typeof cmd[2]?.maxLen === "number") {
            args.push("maxLen", cmd[2].maxLen);
        }
        super(args, opts);
    }
}
exports.LPosCommand = LPosCommand;
