/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

/** JS-facing menu item shape — what the wrapper module passes in. */
export interface TrayMenuItem {
  /**
   * Stable identifier emitted to the click callback when the user
   * activates this item. Should not change across menu rebuilds.
   */
  id: string
  /** Visible label in the menu. */
  label: string
  /** When false, the item is greyed out and unclickable. Default: true. */
  enabled?: boolean
  /**
   * When true, treat this entry as a horizontal separator and ignore
   * all other fields. Default: false.
   */
  separator?: boolean
}
/** Public handle — JS keeps one of these alive for the tray's lifetime. */
export declare class Tray {
  /**
   * Construct a tray. The icon and menu can be set later; passing
   * the initial values here just avoids one round-trip to the tray
   * thread on the common boot path.
   *
   * `on_click` is called with the menu item's `id` whenever the
   * user activates an item. It's invoked on the Node event loop
   * thread (via `ThreadsafeFunction`), so JS handlers don't need
   * to worry about cross-thread state.
   */
  constructor(iconPng: Buffer, tooltip: string, items: Array<TrayMenuItem>, onClick: (...args: any[]) => any)
  /**
   * Replace the entire menu. Existing item IDs lose their meaning —
   * the click callback only knows about IDs in the latest set.
   */
  setMenu(items: Array<TrayMenuItem>): void
  /**
   * Swap the tray icon. Accepts raw PNG bytes (any size; tray-icon
   * re-rasters to platform-appropriate sizes itself).
   */
  setIcon(png: Buffer): void
  /** Update the hover tooltip text. */
  setTooltip(tooltip: string): void
  /**
   * Tear down the tray. After `destroy()` every other method on
   * this handle is a no-op error. Idempotent.
   */
  destroy(): void
}
