import type { ComponentType, ReactNode } from 'react';

export type PresentationId = 'telegram' | 'whatsapp' | 'instagram';

export type MainSidebarHeaderCenterProps = {
  searchActive: boolean;
  search: string;
  onSearchChange: (value: string) => void;
  onSearchBlur: () => void;
};

export type DialogRowPresenterProps = {
  avatarId: string;
  title: string;
  preview: string;
  timeLabel: string;
  selected: boolean;
  closed: boolean;
  switchBlocked: boolean;
  onClick: () => void;
  showReadCheck: boolean;
  unread: number;
};

export type ChannelHeaderCenterProps = {
  title: string;
  status: string;
  statusTone: 'muted' | 'accent';
  avatarId: string;
  avatarSize?: number;
};

export type ScrollToBottomButtonProps = {
  visible: boolean;
  onClick: () => void;
  unread: number;
};

export interface PresentationComponents {
  MainSidebarHeaderCenter: ComponentType<MainSidebarHeaderCenterProps>;
  MainDesktopSidebarShell: ComponentType<{ children: ReactNode }>;
  NoChannelSelected: ComponentType<Record<string, never>>;
  DialogRow: ComponentType<DialogRowPresenterProps>;
  DialogsListSkeleton: ComponentType<Record<string, never>>;
  EmptyDialogs: ComponentType<Record<string, never>>;
  ChannelHeaderCenter: ComponentType<ChannelHeaderCenterProps>;
  JoinChannelBar: ComponentType<{ children: ReactNode }>;
  MessagesSkeleton: ComponentType<Record<string, never>>;
  DateChip: ComponentType<{ ts: number }>;
  ScrollToBottomButton: ComponentType<ScrollToBottomButtonProps>;
  CloseConversationButton: ComponentType<{ onClick: () => void }>;
  BubbleTail: ComponentType<{ isOut: boolean }>;
  RichMessagebarRoot: ComponentType<{ children: ReactNode }>;
  RichMessagebarComposerWrap: ComponentType<{ children: ReactNode }>;
}
