import { FieldLabel, Box, Tag } from '@rocket.chat/fuselage'; import type { ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; import { useHasLicenseModule } from '../../../hooks/useHasLicenseModule'; export type AppearanceFieldLabelProps = ComponentProps & { premium?: boolean; children: string; }; const AppearanceFieldLabel = ({ children, premium = false, ...props }: AppearanceFieldLabelProps) => { const { t } = useTranslation(); const { data: hasLicense = false } = useHasLicenseModule('livechat-enterprise'); const shouldDisableEnterprise = premium && !hasLicense; if (!shouldDisableEnterprise) { return {children}; } return ( {children} {t('Premium')} ); }; export default AppearanceFieldLabel;