import { useTranslation } from "react-i18next"; import { CodeBlock, CodeBlockAction, EmptyState, EmptyStateBody, Title, } from "@patternfly/react-core"; import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation"; import { CopyToClipboardButton } from "./CopyToClipboardButton"; import { KeycloakTextArea } from "../../components/keycloak-text-area/KeycloakTextArea"; type GeneratedCodeTabProps = { user?: UserRepresentation; text: string; label: string; }; export const GeneratedCodeTab = ({ text, user, label, }: GeneratedCodeTabProps) => { const { t } = useTranslation("clients"); return user ? ( } > ) : ( {t(`${label}No`)} {t(`${label}IsDisabled`)} ); };