/// <reference path="../../index.d.ts" />
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { IPredefinedProfile } from "../../utils/profile/types.js";
import type { editor } from "monaco-editor";
import type { T9nMeta } from "@arcgis/lumina/controllers";

/**
 * The SQL Expression Editor provides a familiar code editor experience for writing your own SQL expressions.
 * It supports syntax highlighting, code completion, and validation, allowing users to write SQL expressions using the
 * [standardized SQL functions](https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm) supported by ArcGIS.
 *
 * @internal
 */
export abstract class ArcgisSqlExpressionEditor extends LitElement {
  /**
   * If true, it will hide the side actions bar. The editor will be in a minimalistic UX.
   *
   * @default false
   * @example
   * ```html
   *  <arcgis-sql-expression-editor hideSideBar></arcgis-sql-expression-editor>
   * ```
   */
  accessor hideSideBar: boolean;
  /** @internal */
  protected messages: Partial<{
      fields: string;
      functions: string;
  }> & T9nMeta<{
      fields: string;
      functions: string;
  }>;
  /**
   * The profile to use for the editor. The profile defines the variables and functions that are available to the editor.
   *
   * @example
   * ```jsx
   * <arcgis-sql-expression-editor profile={id: "field-calculation", definitions: { $layer: layer }}></arcgis-sql-expression-editor>
   * ```
   */
  accessor profile: IPredefinedProfile | undefined;
  /**
   * The sql expression script. Use this property to define or update the script.
   *
   * @default ""
   * @example
   * ```html
   * <arcgis-sql-expression-editor script="CAST(2.45 AS INTEGER)"></arcgis-sql-expression-editor>
   * ```
   */
  accessor script: string;
  /** Set the focus on the element. */
  setFocus(): Promise<void>;
  /** Emitted when the diagnostics collection has changed. */
  readonly arcgisDiagnosticsChange: import("@arcgis/lumina").TargetedEvent<this, editor.IMarkerData[]>;
  /** Emitted when the script string has changed. */
  readonly arcgisScriptChange: import("@arcgis/lumina").TargetedEvent<this, string>;
  readonly "@eventTypes": {
    arcgisDiagnosticsChange: ArcgisSqlExpressionEditor["arcgisDiagnosticsChange"]["detail"];
    arcgisScriptChange: ArcgisSqlExpressionEditor["arcgisScriptChange"]["detail"];
  };
}