import type { BaseItemPerson } from "@jellyfin/sdk/lib/generated-client/models"; import React from "react"; import { useTranslation } from "react-i18next"; import { View } from "react-native"; import { Text } from "@/components/common/Text"; import { useScaledTVTypography } from "@/constants/TVTypography"; export interface TVCastCrewTextProps { director?: BaseItemPerson | null; cast?: BaseItemPerson[]; /** Hide the cast section (e.g., when visual cast section is shown) */ hideCast?: boolean; } export const TVCastCrewText: React.FC = React.memo( ({ director, cast, hideCast = false }) => { const typography = useScaledTVTypography(); const { t } = useTranslation(); if (!director && (!cast || cast.length === 0)) { return null; } return ( {t("item_card.cast_and_crew")} {director && ( {t("item_card.director")} {director.Name} )} {!hideCast && cast && cast.length > 0 && ( {t("item_card.cast")} {cast.map((c) => c.Name).join(", ")} )} ); }, );