import type { FC } from 'react' import React from 'react' import { Bars3Icon, PencilSquareIcon, } from '@heroicons/react/24/solid' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' import { ReplayIcon } from '@/app/components/app/chat/icon-component' import Tooltip from '@/app/components/base/tooltip' export type IHeaderProps = { title: string customerIcon?: React.ReactNode icon: string icon_background: string isMobile?: boolean isEmbedScene?: boolean onShowSideBar?: () => void onCreateNewChat?: () => void } const Header: FC = ({ title, isMobile, customerIcon, icon, icon_background, isEmbedScene = false, onShowSideBar, onCreateNewChat, }) => { const { t } = useTranslation() if (!isMobile) return null if (isEmbedScene) { return (
{customerIcon || }
{title}
{ onCreateNewChat?.() }}>
) } return (
onShowSideBar?.()} >
{title}
onCreateNewChat?.()} >
) } export default React.memo(Header)