import { FC, lazy } from "react";
import { ConfigElementProps } from "./interface";
import { globalColor } from "@/utils/colorBuilder";
const RestApiConfigElement = lazy(() => import("./RestApiConfigElement"));

export const ConfigElement: FC<ConfigElementProps> = (props) => {
  const { resourceType } = props;

  switch (resourceType) {
    case "restapi":
      return <RestApiConfigElement {...props} />;
    case "impaktapps":
      return (
        <div style={{ color: globalColor("grayBlue-04") }}>
          Imapkt Resource are not Editable andalso Multiple resource not allowed
        </div>
      );
    default:
      return null;
  }
};
