
export interface MQTTMessage {
  id: string;
  topic: string;
  payload: string;
  qos: number;
  retained: boolean;
  timestamp: string;
  size: number;
  type?: 'json' | 'text' | 'image' | 'binary';
}

export interface TopicNode {
  name: string;
  fullName: string;
  children: TopicNode[];
  lastMessage?: MQTTMessage;
  messageCount: number;
  isExpanded?: boolean;
}

export interface BrokerProfile {
  id: string;
  name: string;
  host: string;
  port: number;
  useTLS: boolean;
  username?: string;
  password?: string;
  clientId: string;
  defaultSubscribe: string;
}

export interface AppSettings {
  theme: 'dark-monokai' | 'light';
  repoUrl: string;
  ttlDays: number;
  maxPayloadBytes: number;
  autoPurgePayloads: boolean;
  autoPurgePayloadBytes: number;
  autoExpandDepth: number;
  imageDetectionEnabled: boolean;
  highlightMs: number;
  mqttProfiles: MQTTProfile[];
  activeProfileId: string;
  applyViewFilter: boolean;
  expandTreeOnStart: boolean;
  topicFilters: TopicFilter[];
  uiFontSize: number;
  topicFontSize: number;
  payloadFontSize: number;
  statsRefreshMs: number;
  resizeHandlePx: number;
}

export interface MQTTProfile {
  id: string;
  name: string;
  host: string;
  port: number;
  username: string;
  password: string;
  isDefault: boolean;
}

export interface TopicFilter {
  topic: string;
  save: boolean;
  view: boolean;
}
