import { Group, Text, Badge, Button, Box, Stack, Tooltip, } from "@mantine/core"; import { useTranslation } from "react-i18next"; import { IntegrationDefinition, Integration, } from "../types/integration.types"; import { getIntegrationIcon } from "./integration-icons"; import { useHasFeature } from "@/ee/hooks/use-feature"; import { Feature } from "@/ee/features"; import { useUpgradeLabel } from "@/ee/hooks/use-upgrade-label"; type IntegrationRowProps = { definition: IntegrationDefinition; installation?: Integration; onInstall: (type: string) => void; onUninstall: (integrationId: string) => void; }; export default function IntegrationRow({ definition, installation, onInstall, onUninstall, }: IntegrationRowProps) { const { t } = useTranslation(); const isInstalled = !!installation; const hasAccess = useHasFeature(Feature.INTEGRATIONS); const locked = !!definition.requiresLicense && !hasAccess; const upgradeLabel = useUpgradeLabel(); return ( {getIntegrationIcon(definition.type, 28)} {definition.name} {locked && ( {t("Paid")} )} {definition.description} {isInstalled ? ( ) : ( )} ); }