import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
import { RegexOption, TypeOption } from '../../types/common-options.js'
import { AllCommonOptions } from '../../types/all-common-options.js'
/**
 * Configuration options for the sort-array-includes rule.
 *
 * This rule enforces the sorting of arrays passed to the `.includes()` method,
 * ensuring consistent ordering of array elements for better readability and
 * maintainability.
 */
export type Options = Partial<
  {
    /**
     * Conditional configuration based on pattern matching.
     */
    useConfigurationIf: {
      /**
       * Regular expression pattern to match against all array element names.
       * The rule is only applied when all names match this pattern.
       */
      allNamesMatchPattern?: RegexOption
      /**
       * AST selector to match against ArrayExpression nodes.
       */
      matchesAstSelector?: string
    }
  } & AllCommonOptions<
    TypeOption,
    AdditionalSortOptions,
    CustomGroupMatchOptions
  >
>[]
/**
 * Represents the type of array element selector. Note: Spread elements are not
 * sorted and act as partition boundaries.
 */
export type Selector = (typeof allSelectors)[number]
/**
 * Additional configuration for a single custom group.
 *
 * Custom groups allow fine-grained control over how array elements are grouped
 * and sorted based on their names and types.
 *
 * @example
 *
 * ```ts
 * {
 *   "selector": "literal"
 * }
 * ```
 */
interface CustomGroupMatchOptions {
  /**
   * Specifies the type of array elements to include in this group. Only
   * 'literal' is available since spread elements create partition boundaries
   * and are not sorted.
   */
  selector?: Selector
}
type AdditionalSortOptions = object
/**
 * Complete list of available selectors for array elements. Used for validation
 * and JSON schema generation.
 */
export declare let allSelectors: readonly ['literal']
/**
 * Additional custom group match options JSON schema. Used by ESLint to validate
 * rule options at configuration time.
 */
export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
  string,
  JSONSchema4
>
export {}
