interface WordTempItem {
  id: string;
  name: string;
}

interface WordHistoryItem {
  name: string;
  id: string;
  workflowRun: {
    id: string;
  };
  createdByEndUser: {
    id: string;
    sessionId: string;
  };
}

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

interface WorkflowContext {
  userId: string;
  conversationId: string;
  content: string;
  inputs: {
    [key: string]: any;
  };
  files: [];
}
interface WorkflowResult {
  conversationId: string;
  answer: object;
  messageFiles?: [
    {
      id: string;
      url: string;
    },
  ];
  data: {
    outputs: {
      result: string;
    };
  };
}
interface Props {
  itemMessage?: ResultItem[];
  item?: WordTempItem;
  paramsData?: object;
  runChatflow?: (
    appId: any,
    context: WorkflowContext,
  ) => Promise<WorkflowResult>;
  projectInfo: object;
}

interface PropsHistory {
  temp: any;
  items?: WordHistoryItem[];
  key?: string;
  title: string;
  loading: boolean;
}

export type { Props, PropsHistory, ResultItem, WordHistoryItem, WordTempItem };
