import {
  capabilityToi18nKey,
  useCustomServerTranslation,
} from 'src/hooks/useCustomServerTranslation';
import { UserPermissions } from 'src/utils/permissions';

const usePathsTitle = (
  defaultTranslationKey = `title_${UserPermissions.VIEW_PATHS}`,
) => {
  const getCustomTitle = useCustomServerTranslation();

  return getCustomTitle(
    capabilityToi18nKey(UserPermissions.VIEW_PATHS),
    defaultTranslationKey,
  );
};

export default usePathsTitle;
