import { Text, Stack, ThemeIcon } from "@mantine/core";
import { IconTableOff } from "@tabler/icons-react";
import { useTranslation } from "react-i18next";
import type { ViewType } from "../types/database-view.types";

interface PlaceholderRendererProps {
  viewType: ViewType;
}

/**
 * Displayed for viewType values not yet implemented (kanban, calendar).
 * These renderers arrive in R3.1.d.
 */
export function PlaceholderRenderer({ viewType }: PlaceholderRendererProps) {
  const { t } = useTranslation();

  return (
    <Stack align="center" py="xl" gap="xs">
      <ThemeIcon variant="light" color="gray" size="lg">
        <IconTableOff size={20} />
      </ThemeIcon>
      <Text size="sm" c="dimmed">
        {t("database_view.placeholder.not_supported", { viewType })}
      </Text>
    </Stack>
  );
}
