import { AspectRatio, Box, Heading, HStack, Icon, Image, Skeleton, Text, VStack, } from "@chakra-ui/react"; import { FaBolt } from "react-icons/fa"; import ChatTypingLoader from "../loading/ChatTypingLoader"; import { IoDocumentTextOutline, IoImageOutline, IoVideocamOutline, } from "react-icons/io5"; import ReactMarkdown from "react-markdown"; import remarkBreaks from "remark-breaks"; const iconsDic = { llm: IoDocumentTextOutline, image: IoImageOutline, video: IoVideocamOutline, }; function ResultBox({ type = "llm", loading = false, resultData = "", imgWidth = 500, imgHeight = 500, }) { return ( نتیجه {loading && type === "llm" && ( )} {type === "llm" && !loading && ( , h2: (props) => , h3: (props) => , p: (props) => , }} > {resultData} )} {(type === "image" || type === "video") && loading && ( در حال تولید {type === "image" ? "تصویر" : "ویدئو"}... )} {type === "image" && !loading && resultData?.[0] && ( )} {type === "video" && !loading && resultData?.[0] && ( )} ); } export default ResultBox;