import { useTranslation } from "react-i18next"; import { faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { OrgPermissionCan, PermissionDeniedBanner } from "@app/components/permissions"; import { Button } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects, useOrgPermission } from "@app/context"; import { usePopUp } from "@app/hooks"; import { AddOrgIncidentContactModal } from "./AddOrgIncidentContactModal"; import { OrgIncidentContactsTable } from "./OrgIncidentContactsTable"; export const OrgIncidentContactsSection = () => { const { t } = useTranslation(); const { handlePopUpToggle, popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([ "addContact" ] as const); const { permission } = useOrgPermission(); return ( <>

{t("section.incident.incident-contacts")}

{(isAllowed) => ( )}
{permission.can(OrgPermissionActions.Read, OrgPermissionSubjects.IncidentAccount) ? ( ) : ( )}
); };