import {
  type Dictionary,
  type EntityKey,
  type EntityMetadata,
  type EntityName,
  type MetadataStorage,
  type RawQueryFragmentSymbol,
} from '@mikro-orm/core';
import type { ICriteriaNode } from '../typings.js';
/**
 * @internal
 */
export declare class CriteriaNodeFactory {
  static createNode<T extends object>(
    metadata: MetadataStorage,
    entityName: EntityName<T>,
    payload: any,
    parent?: ICriteriaNode<T>,
    key?: EntityKey<T> | RawQueryFragmentSymbol,
    validate?: boolean,
  ): ICriteriaNode<T>;
  static createScalarNode<T extends object>(
    metadata: MetadataStorage,
    entityName: EntityName<T>,
    payload: any,
    parent?: ICriteriaNode<T>,
    key?: EntityKey<T> | RawQueryFragmentSymbol,
    validate?: boolean,
  ): ICriteriaNode<T>;
  static createArrayNode<T extends object>(
    metadata: MetadataStorage,
    entityName: EntityName<T>,
    payload: any[],
    parent?: ICriteriaNode<T>,
    key?: EntityKey<T>,
    validate?: boolean,
  ): ICriteriaNode<T>;
  static createObjectNode<T extends object>(
    metadata: MetadataStorage,
    entityName: EntityName<T>,
    payload: Dictionary,
    parent?: ICriteriaNode<T>,
    key?: EntityKey<T>,
    validate?: boolean,
  ): ICriteriaNode<T>;
  static createObjectItemNode<T extends object>(
    metadata: MetadataStorage,
    entityName: EntityName<T>,
    node: ICriteriaNode<T>,
    payload: Dictionary,
    key: EntityKey<T> | RawQueryFragmentSymbol,
    meta?: EntityMetadata<T>,
    validate?: boolean,
  ): ICriteriaNode<T>;
}
