import React from 'react'; import PropTypes from 'prop-types'; import { getRightIcon, getWeightedPermissions, } from '../../../helpers/utils/permission'; import { useI18nContext } from '../../../hooks/useI18nContext'; /** * Get one or more permission descriptions for a permission name. * * @param permission - The permission to render. * @param index - The index of the permission. * @returns {JSX.Element} A permission description node. */ function getDescriptionNode(permission, index) { const { label, leftIcon, permissionName } = permission; return (