const RAILS_MOUNTED_COMPONENTS_REGEX = /app\/javascript\/src\/[^/]*\.(js|jsx)$/;

const ADMIN_AND_PUBLIC_APP_REGEX =
  /app\/javascript\/src\/(?:.*\/)?(AdminApp|PublicApp)(\/index)?\.(js|jsx)$/;

const PACKS_FILES_REGEX = /app\/javascript\/packs\/[^/]*\.(js|jsx)$/;

const TYPES = {
  CLASS_DECLARATION: "ClassDeclaration",
  FUNCTION_DECLARATION: "FunctionDeclaration",
  IMPORT_DEFAULT_SPECIFIER: "ImportDefaultSpecifier",
  IMPORT_NAMESPACE_SPECIFIER: "ImportNamespaceSpecifier",
  VARIABLE_DECLARATION: "VariableDeclaration",
};

module.exports = {
  RAILS_MOUNTED_COMPONENTS_REGEX,
  PACKS_FILES_REGEX,
  TYPES,
  ADMIN_AND_PUBLIC_APP_REGEX,
};
