// Type definitions for Phoenix LiveView hooks

export interface LiveViewHook {
  el?: HTMLElement;
  mounted?(): void;
  updated?(): void;
  destroyed?(): void;
  disconnected?(): void;
  reconnected?(): void;
  handleEvent?(event: string, callback: (payload: any) => void | Promise<void>): void;
  pushEvent?(event: string, payload: any): void;
}

export interface SensorChartHook extends LiveViewHook {
  chart?: any;
  isLiveMode?: boolean;
  createChart(): void;
  handleLiveDataUpdate(event: any): void;
}
