import type { ILivechatDepartment, IOmnichannelCannedResponse } from '@rocket.chat/core-typings'; import { useTranslation } from 'react-i18next'; export const useScopeDict = (scope: IOmnichannelCannedResponse['scope'], departmentName: ILivechatDepartment['name'] | undefined) => { const { t } = useTranslation(); const dict: Record = { global: t('Public'), user: t('Private'), }; return dict[scope] || departmentName; };