import type { CSSResultOrNative } from 'lit'
import { customElement } from 'lit/decorators.js'
import Element from './internals/CodeEditor.js'
import styles from './internals/CodeEditor.styles.js'

@customElement('code-editor')
export class CodeEditorElement extends Element {
  static override styles: CSSResultOrNative[] = [styles]
}

declare global {
  interface HTMLElementTagNameMap {
    'code-editor': CodeEditorElement
  }
}

export default CodeEditorElement
export type {
  Suggestion,
  FunctionInsertEvent,
  SuggestionInsertEvent,
  FunctionDocumentationEvent,
} from './internals/types.js'
export type { FunctionSchema, FunctionParameter } from '@pawel-up/jexl/schemas/types.js'
