import { parse } from "@babel/parser";
import { traverse } from "../traverse.js";
export const EXTERNAL_LIBRARY_OPTIONS = [
    {
        library: "sonner",
        imports: new Set(["toast"]),
    },
    {
        library: "@superblocksteam/library",
        imports: new Set([
            "copyToClipboard",
            "navigateTo",
            "setQueryParams",
            "download",
            "logoutIntegrations",
            "Global",
            "Theme",
            "Env",
            "Embed",
        ]),
    },
];
export function getImports(code) {
    const importPaths = [];
    try {
        const ast = parse(code, {
            sourceType: "module",
            plugins: ["jsx", "typescript"],
        });
        traverse(ast, {
            ImportDeclaration(path) {
                importPaths.push(path.node.source.value);
            },
        });
    }
    catch {
        return importPaths;
    }
    return importPaths;
}
//# sourceMappingURL=imports.js.map