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: any;
  footer?: any;
}

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

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

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

interface ChatListResult {
  id: string;
  name: string;
  inputs: {
    [key: string]: any;
  };
  status: string;
  introduction: string;
  createAt: string;
  updatedAt: string;
}

interface ModeListResult {
  title: string;
  label: string;
  key: string;
}

export type {
  AppListResult,
  ChatListResult,
  ModeListResult,
  Props,
  PropsHistory,
  ResultItem,
  WordHistoryItem,
  WordTempItem,
};
