import { useState } from 'react';
|
import { LoadingIndicator, LocalesMenuButton } from 'react-admin';
|
import { IconButton, Tooltip } from '@mui/material';
|
import SmartToyOutlinedIcon from '@mui/icons-material/SmartToyOutlined';
|
import { ThemeSwapper } from '../themes/ThemeSwapper';
|
import { TenantTip } from './TenantTip';
|
import AiChatDrawer from './AiChatDrawer';
|
|
export const AppBarToolbar = () => {
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
return (
|
<>
|
<Tooltip title="AI 对话">
|
<IconButton color="inherit" onClick={() => setDrawerOpen(true)}>
|
<SmartToyOutlinedIcon />
|
</IconButton>
|
</Tooltip>
|
<LocalesMenuButton />
|
<ThemeSwapper />
|
<LoadingIndicator />
|
<TenantTip />
|
<AiChatDrawer open={drawerOpen} onClose={() => setDrawerOpen(false)} />
|
</>
|
);
|
};
|