2024-08-21 02:01:29 +02:00
|
|
|
// Copyright 2024, Command Line Inc.
|
2024-07-30 20:44:19 +02:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2024-10-14 23:57:12 +02:00
|
|
|
import { MessageModal } from "@/app/modals/messagemodal";
|
2024-08-20 00:49:40 +02:00
|
|
|
import { AboutModal } from "./about";
|
2024-07-30 20:44:19 +02:00
|
|
|
import { TosModal } from "./tos";
|
|
|
|
import { UserInputModal } from "./userinputmodal";
|
|
|
|
|
|
|
|
const modalRegistry: { [key: string]: React.ComponentType<any> } = {
|
|
|
|
[TosModal.displayName || "TosModal"]: TosModal,
|
|
|
|
[UserInputModal.displayName || "UserInputModal"]: UserInputModal,
|
2024-08-20 00:49:40 +02:00
|
|
|
[AboutModal.displayName || "AboutModal"]: AboutModal,
|
2024-10-14 23:57:12 +02:00
|
|
|
[MessageModal.displayName || "MessageModal"]: MessageModal,
|
2024-07-30 20:44:19 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const getModalComponent = (key: string): React.ComponentType<any> | undefined => {
|
|
|
|
return modalRegistry[key];
|
|
|
|
};
|