/* eslint-disable */ // @ts-nocheck import { HelpItem } from "../../../shared/keycloak-ui-shared"; import { Label } from "../../../shared/@patternfly/react-core"; import { CodeBranchIcon, MapMarkerIcon, ProcessAutomationIcon, TaskIcon, } from "../../../shared/@patternfly/react-icons"; import { useTranslation } from "react-i18next"; import { useAuthenticationProvider } from "./AuthenticationProviderContext"; import { FlowType } from "./FlowRow"; type FlowTitleProps = { id?: string; type: FlowType; title: string; subtitle: string; providerId?: string; }; const FlowIcon = ({ type }: { type: FlowType }) => { switch (type) { case "condition": return ; case "flow": return ; case "execution": return ; case "step": return ; default: return undefined; } }; function mapTypeToColor(type: FlowType) { switch (type) { case "condition": return "purple"; case "flow": return "green"; case "execution": return "blue"; case "step": return "cyan"; default: return "grey"; } } export const FlowTitle = ({ id, type, title, subtitle, providerId, }: FlowTitleProps) => { const { t } = useTranslation(); const { providers } = useAuthenticationProvider(); const helpText = providers?.find((p) => p.id === providerId)?.description || subtitle; return (
{" "} {title}{" "} {helpText && }
); };