import type { MenuProps } from 'antd';
import type { ReactNode } from 'react';
import type { PlanQuickFilter } from '../../features/planBoard';
import type {
  ApiSectionKey,
  ChatSectionKey,
  HeaderTopMenuKey,
  PlanSectionKey,
  PlaySidebarKey,
  TopMenuKey,
} from './routes';
export type {
  HeaderTopMenuKey,
  PlaySidebarKey,
  TopMenuKey,
} from './routes';

export type PlanSidebarKey = PlanSectionKey;
export type ChatSidebarKey = ChatSectionKey;

export type MainHeaderProps = {
  activeTopMenu: TopMenuKey;
  sidebarCollapsed: boolean;
  contentExpanded: boolean;
  isMobileViewport: boolean;
  onToggleSidebar: () => void;
  onToggleContentExpanded: () => void;
  onChangeTopMenu: (menu: HeaderTopMenuKey) => void;
  onOpenSearch: () => void;
  onOpenPlanQuickFilter: (filter: PlanQuickFilter) => void;
};

export type MainSidebarProps = {
  activeTopMenu: TopMenuKey;
  hasAccess: boolean;
  sidebarCollapsed: boolean;
  isMobileViewport: boolean;
  mobileInline?: boolean;
  openKeys: string[];
  apiMenuItems: MenuProps['items'];
  docsMenuItems: MenuProps['items'];
  planMenuItems: MenuProps['items'];
  chatMenuItems: MenuProps['items'];
  playMenuItems: MenuProps['items'];
  selectedApiMenu: ApiSectionKey;
  selectedDocsMenu: string;
  selectedPlanMenu: PlanSidebarKey;
  selectedChatMenu: ChatSidebarKey;
  selectedPlayMenu: PlaySidebarKey;
  introColor: string;
  introTag: string;
  introDescription: string;
  onOpenKeysChange: (keys: string[]) => void;
  onSelectApiMenu: (key: ApiSectionKey) => void;
  onSelectDocsMenu: (key: string) => void;
  onSelectPlanMenu: (key: PlanSidebarKey) => void;
  onSelectChatMenu: (key: ChatSidebarKey) => void;
  onSelectPlayMenu: (key: PlaySidebarKey) => void;
};

export type MainContentProps = {
  contentExpanded: boolean;
  sidebarOverlayActive?: boolean;
  disableWindowLayer?: boolean;
  onToggleContentExpanded: () => void;
  children: ReactNode;
};
