import type { ResearchMap } from "@/lib/types/research";

export type RefineTab = "edit" | "chat";

export interface RefineChatMessage {
  role: "user" | "assistant";
  content: string;
}

export interface RefineSession {
  topicId: string;
  topicLabel: string;
  draft: ResearchMap | null;
  baseline: ResearchMap | null;
  messages: RefineChatMessage[];
  tab: RefineTab;
  open: boolean;
  engaged: boolean;
  chatting: boolean;
  chatInput: string;
  saving: boolean;
  updatedAt: string;
}

export interface PersistedRefineSession {
  topicId: string;
  topicLabel: string;
  draft: ResearchMap | null;
  baseline: ResearchMap | null;
  messages: RefineChatMessage[];
  tab: RefineTab;
  open: boolean;
  engaged: boolean;
  chatInput: string;
  updatedAt: string;
}