import { Menu, Transition } from '@headlessui/react' import { RiArrowRightSLine, RiArrowRightUpLine, RiDiscordLine, RiFeedbackLine, RiMailSendLine, RiQuestionLine } from '@remixicon/react' import { Fragment } from 'react' import Link from 'next/link' import { useTranslation } from 'react-i18next' import { mailToSupport } from '../utils/util' import cn from '@/utils/classnames' import { useProviderContext } from '@/context/provider-context' import { Plan } from '@/app/components/billing/type' import { useAppContext } from '@/context/app-context' export default function Support() { const itemClassName = ` flex items-center w-full h-9 pl-3 pr-2 text-text-secondary system-md-regular rounded-lg hover:bg-state-base-hover cursor-pointer gap-1 ` const { t } = useTranslation() const { plan } = useProviderContext() const { userProfile, langeniusVersionInfo } = useAppContext() const canEmailSupport = plan.type === Plan.professional || plan.type === Plan.team || plan.type === Plan.enterprise return { ({ open }) => ( <>
{t('common.userProfile.support')}
{canEmailSupport && {({ active }) =>
{t('common.userProfile.emailSupport')}
}
} {({ active }) =>
{t('common.userProfile.communityFeedback')}
}
{({ active }) =>
{t('common.userProfile.community')}
}
) }
}