import React from "react"; import { PersonalProfileModel, SupportContactModel } from "../../../models"; import { ApplicationsCardProps } from "../../ApplicationsCard"; import { MenuItemType } from "../../Menu"; import { LANGUAGE } from "../../ConfigProvider"; import { MainLayoutConfig } from "../MainLayout.types"; export type NotiType = "All" | "Unseen"; export type NotiStatus = "Read" | "Unread"; export type Theme = "Light" | "Dark"; export interface ExtraHeaderProps { onChangeTheme: (theme: any) => void; } export interface HeaderProps extends ApplicationsCardProps { logoUrl: string; collapsed: boolean; toggleCollapse?: () => void; avatarUrl?: string; avatarThumbnailUrl?: string; isMobile: boolean; isShowCollapseButton?: boolean; headerTitle?: string; profileMenuItems?: MenuItemType[]; homePageUrl: string; customHeader?: React.ReactNode; supportContactData: SupportContactModel[]; notification?: NotificationProps; LinkComponent: any; isSwitchTheme?: boolean; onSwitchedTheme?: (theme: Theme) => void; theme?: ThemeType; onChangeLocale?: (locale: LANGUAGE) => void; lang: LANGUAGE; scrolled?: boolean; personalProfile: PersonalProfileModel; config?: MainLayoutConfig; } export type ThemeType = { getApi: string; updateApi: string; params?: any; }; export interface NotificationType { title?: string; notifications: NotificationItemType[]; unseenNotifications: NotificationItemType[]; onReadAll?: () => void; onChangeStatus?: (ids: number[], status: NotiStatus) => void; onClickNotificationItem?: (item: NotificationItemType) => void; onLoadData: (type: NotiType, page: number, pageSize: number) => Promise; totalNumber: number; unseenTotal: number; } export interface NotificationProps extends NotificationType { visible?: boolean; number?: number; onClick?: () => void; } export interface NotiItemProps { } export interface NotificationItemType { id: number; type: string; from: string; content: string; time: string; isRead: boolean; isSeen: boolean; url: string; } export interface NotificationRef { fetchNotifications: (type: NotiType, isReload?: boolean) => void; } export type HeaderRef = NotificationRef;