import { __exports as c } from "../../../../../../../../_virtual/getBindingIdentifiers.js";
import "../validators/generated/index.js";
import { __exports as u } from "../../../../../../../../_virtual/index35.js";
Object.defineProperty(c, "__esModule", {
  value: !0
});
c.default = o;
var i = u;
function o(l, p, d) {
  const t = [].concat(l), a = /* @__PURE__ */ Object.create(null);
  for (; t.length; ) {
    const e = t.shift();
    if (!e)
      continue;
    const s = o.keys[e.type];
    if ((0, i.isIdentifier)(e)) {
      p ? (a[e.name] = a[e.name] || []).push(e) : a[e.name] = e;
      continue;
    }
    if ((0, i.isExportDeclaration)(e) && !(0, i.isExportAllDeclaration)(e)) {
      (0, i.isDeclaration)(e.declaration) && t.push(e.declaration);
      continue;
    }
    if (d) {
      if ((0, i.isFunctionDeclaration)(e)) {
        t.push(e.id);
        continue;
      }
      if ((0, i.isFunctionExpression)(e))
        continue;
    }
    if (s)
      for (let r = 0; r < s.length; r++) {
        const f = s[r], n = e[f];
        n && (Array.isArray(n) ? t.push(...n) : t.push(n));
      }
  }
  return a;
}
o.keys = {
  DeclareClass: ["id"],
  DeclareFunction: ["id"],
  DeclareModule: ["id"],
  DeclareVariable: ["id"],
  DeclareInterface: ["id"],
  DeclareTypeAlias: ["id"],
  DeclareOpaqueType: ["id"],
  InterfaceDeclaration: ["id"],
  TypeAlias: ["id"],
  OpaqueType: ["id"],
  CatchClause: ["param"],
  LabeledStatement: ["label"],
  UnaryExpression: ["argument"],
  AssignmentExpression: ["left"],
  ImportSpecifier: ["local"],
  ImportNamespaceSpecifier: ["local"],
  ImportDefaultSpecifier: ["local"],
  ImportDeclaration: ["specifiers"],
  ExportSpecifier: ["exported"],
  ExportNamespaceSpecifier: ["exported"],
  ExportDefaultSpecifier: ["exported"],
  FunctionDeclaration: ["id", "params"],
  FunctionExpression: ["id", "params"],
  ArrowFunctionExpression: ["params"],
  ObjectMethod: ["params"],
  ClassMethod: ["params"],
  ClassPrivateMethod: ["params"],
  ForInStatement: ["left"],
  ForOfStatement: ["left"],
  ClassDeclaration: ["id"],
  ClassExpression: ["id"],
  RestElement: ["argument"],
  UpdateExpression: ["argument"],
  ObjectProperty: ["value"],
  AssignmentPattern: ["left"],
  ArrayPattern: ["elements"],
  ObjectPattern: ["properties"],
  VariableDeclaration: ["declarations"],
  VariableDeclarator: ["id"]
};
//# sourceMappingURL=getBindingIdentifiers.js.map
