/**
 * JsonPathBrowser type definitions
 * @countermeasure/web-components/visualization/json-path-browser
 */

export interface JsonPathBrowserConfig {
  /** Container element (or selector) the browser is mounted into. */
  container: HTMLElement | string
  /** Arbitrary JSON-like value to render — objects, arrays, primitives. */
  data: unknown
  /**
   * Expand all nodes by default.
   * @default false
   */
  expanded?: boolean
  /**
   * Render the search input above the tree.
   * @default false
   */
  searchable?: boolean
  /**
   * Show the JSONPath at the bottom when a node is selected.
   * @default false
   */
  showPath?: boolean
  /**
   * Render `{n}` / `[n]` / `str` type badges next to keys.
   * @default false
   */
  showTypes?: boolean
  /** Fired when a node is selected; receives JSONPath and value. */
  onSelect?: (path: string, value: unknown) => void
  /** Additional CSS class names. */
  className?: string
}
