"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZScanCommand = void 0;
const command_js_1 = require("./command.js");
/**
 * @see https://redis.io/commands/zscan
 */
class ZScanCommand extends command_js_1.Command {
    constructor([key, cursor, opts], cmdOpts) {
        const command = ["zscan", key, cursor];
        if (opts?.match) {
            command.push("match", opts.match);
        }
        if (typeof opts?.count === "number") {
            command.push("count", opts.count);
        }
        super(command, cmdOpts);
    }
}
exports.ZScanCommand = ZScanCommand;
