/* eslint-disable */ // @ts-nocheck import { FormSubmitButton, TextControl } from "../../shared/keycloak-ui-shared"; import { Button, ButtonVariant, Form, Modal, ModalVariant, } from "../../shared/@patternfly/react-core"; import { FormProvider, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { useAdminClient } from "../admin-client"; import { useAlerts } from "../../shared/keycloak-ui-shared"; type InviteMemberModalProps = { orgId: string; onClose: () => void; }; export const InviteMemberModal = ({ orgId, onClose, }: InviteMemberModalProps) => { const { adminClient } = useAdminClient(); const { addAlert, addError } = useAlerts(); const { t } = useTranslation(); const form = useForm>(); const { handleSubmit, formState } = form; const submitForm = async (data: Record) => { try { const formData = new FormData(); for (const key in data) { formData.append(key, data[key]); } await adminClient.organizations.invite({ orgId }, formData); addAlert(t("inviteSent")); onClose(); } catch (error) { addError("inviteSentError", error); } }; return ( {t("send")} , , ]} >
); };