29 lines
834 B
TypeScript
29 lines
834 B
TypeScript
import { BotDashboardView } from './components/BotDashboardView';
|
|
import { useBotDashboardModule } from './hooks/useBotDashboardModule';
|
|
import type { BotDashboardModuleProps } from './types';
|
|
import { useBotDashboardViewProps } from './useBotDashboardViewProps';
|
|
import './BotDashboardModule.css';
|
|
import './components/DashboardShared.css';
|
|
|
|
export function BotDashboardModule({
|
|
onOpenImageFactory,
|
|
forcedBotId,
|
|
compactMode = false,
|
|
compactPanelTab: compactPanelTabProp,
|
|
onCompactPanelTabChange,
|
|
}: BotDashboardModuleProps) {
|
|
const dashboard = useBotDashboardModule({
|
|
forcedBotId,
|
|
compactMode,
|
|
compactPanelTab: compactPanelTabProp,
|
|
onCompactPanelTabChange,
|
|
});
|
|
|
|
const viewProps = useBotDashboardViewProps({
|
|
dashboard,
|
|
onOpenImageFactory,
|
|
});
|
|
|
|
return <BotDashboardView {...viewProps} />;
|
|
}
|