prod-wag-backend-automate-s.../web_services/management_frontend/src/validations/mutual/dashboard/props.ts

70 lines
1.5 KiB
TypeScript

import { LanguageTypes } from "@/validations/mutual/language/validations";
type ParamsType = { page: string[] | undefined };
interface MaindasboardPageProps {
params: Promise<ParamsType>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}
interface DashboardLayoutProps {
params: ParamsType;
searchParams: { [key: string]: string | string[] | undefined };
lang: LanguageTypes;
}
type ModeTypes = "shortList" | "fullList" | "create" | "update" | "view";
const ModeTypesList = ["shortList", "fullList", "create", "update", "view"];
interface ContentProps {
lang: LanguageTypes;
translations: Record<string, string>;
activePageUrl: string;
isMulti?: boolean;
mode?: ModeTypes;
}
interface MenuProps {
lang: LanguageTypes;
menuItems: Record<string, Record<string, any>>;
activePageUrl: string;
menuTranslationsFlatten: Record<string, Record<string, any>>;
}
interface MenuSingleProps {
lang: LanguageTypes;
activePageUrl: string;
translations: Record<string, any>;
menuItems: string[];
}
interface FooterProps {
translations: Record<string, string>;
}
interface HeaderProps {
translations: Record<string, string>;
lang: LanguageTypes;
activePageUrl: string;
}
interface SingleLayerItemProps {
isActive: boolean;
innerText: string;
url: string;
}
export type {
MaindasboardPageProps,
DashboardLayoutProps,
ContentProps,
MenuProps,
SingleLayerItemProps,
MenuSingleProps,
FooterProps,
HeaderProps,
ModeTypes,
};
export { ModeTypesList };