"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getComponentSlots = getComponentSlots;
const language_core_1 = require("@vue/language-core");
const utils_1 = require("./utils");
function getComponentSlots(ts, program, virtualCode) {
    const codegen = language_core_1.tsCodegen.get(virtualCode.ir);
    if (!codegen) {
        return [];
    }
    const sourceFile = program.getSourceFile(virtualCode.fileName);
    if (!sourceFile) {
        return [];
    }
    const checker = program.getTypeChecker();
    const assignName = codegen.getScriptSetupRanges()?.defineSlots?.name ?? language_core_1.names.slots;
    const slots = (0, utils_1.getVariableType)(ts, checker, sourceFile, assignName);
    if (!slots) {
        return [];
    }
    return slots.type.getProperties().map(({ name }) => name);
}
//# sourceMappingURL=getComponentSlots.js.map