interface PPTTempItem {
  id: string;
  name: string;
  workflowRunId?: string;
  appId?: string;
  userId?: string;
  taskId?: string;
  url?: string;
}

interface PptHistoryItem {
  id: string;
  workflowRun: {
    id: string;
  };
  createdByEndUser: {
    id: string;
    sessionId: string;
  };
}

interface Props {
  items?: PptHistoryItem[];
  temp: PPTTempItem[];
  title: string;
  loading: boolean;
}

interface ResultItem {
  key: number;
  role: 'ai' | 'user';
  content: string;
  footer?: any;
}

interface WorkflowContext {
  userId: string;
  conversationId: string;
  files: unknown[];
  inputs: Record<string, unknown>;
}

interface WorkflowResult {
  data: {
    outputs: {
      result: string;
    };
  };
}

interface PropsWork {
  itemMessage?: ResultItem;
  item?: PPTTempItem;
  runWorkflow?: (
    appId: any,
    context: WorkflowContext,
  ) => Promise<WorkflowResult>;
}

export type {
  PptHistoryItem,
  PPTTempItem,
  Props,
  PropsWork,
  ResultItem,
  WorkflowContext,
  WorkflowResult,
};
