hooks.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. import type {
  2. NCoreUIKitBase
  3. } from ".";
  4. import type {
  5. NCoreUIKitConfig,
  6. LocalizeType,
  7. ThemesType
  8. } from "../types";
  9. import type NCoreUIKitBottomSheetClass from "../context/bottomSheet";
  10. import type NCoreUIKitLocalizeClass from "../context/localize";
  11. import type NCoreUIKitSnackBarClass from "../context/snackBar";
  12. import type NCoreUIKitDialogClass from "../context/dialog";
  13. import type NCoreUIKitModalClass from "../context/modal";
  14. import type NCoreUIKitToastClass from "../context/toast";
  15. import type NCoreUIKitThemeClass from "../context/theme";
  16. export let NCoreUIKitBottomSheet: NCoreUIKitBottomSheetClass;
  17. export let NCoreUIKitLocalize: NCoreUIKitLocalizeClass<LocalizeType>;
  18. export let NCoreUIKitTheme: NCoreUIKitThemeClass<ThemesType>;
  19. export let NCoreUIKitSnackBar: NCoreUIKitSnackBarClass;
  20. export let NCoreUIKitDialog: NCoreUIKitDialogClass;
  21. export let NCoreUIKitModal: NCoreUIKitModalClass;
  22. export let NCoreUIKitToast: NCoreUIKitToastClass;
  23. export const initializeInstances = (NCoreUIKit: NCoreUIKitBase<NCoreUIKitConfig>) => {
  24. NCoreUIKitBottomSheet = NCoreUIKit.NCoreUIKitContext.NCoreUIKitBottomSheet;
  25. NCoreUIKitLocalize = NCoreUIKit.NCoreUIKitContext.NCoreUIKitLocalize;
  26. NCoreUIKitSnackBar = NCoreUIKit.NCoreUIKitContext.NCoreUIKitSnackBar;
  27. NCoreUIKitDialog = NCoreUIKit.NCoreUIKitContext.NCoreUIKitDialog;
  28. NCoreUIKitTheme = NCoreUIKit.NCoreUIKitContext.NCoreUIKitTheme;
  29. NCoreUIKitModal = NCoreUIKit.NCoreUIKitContext.NCoreUIKitModal;
  30. NCoreUIKitToast = NCoreUIKit.NCoreUIKitContext.NCoreUIKitToast;
  31. };