/* eslint-disable */ // @ts-nocheck import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation"; import { FormProvider, UseFormReturn } from "react-hook-form"; import { FormAccess } from "../form/FormAccess"; import type { KeyValueType } from "./key-value-convert"; import { KeyValueInput } from "./KeyValueInput"; import { FixedButtonsGroup } from "../form/FixedButtonGroup"; import "./AttributeForm.css"; export type AttributeForm = Omit & { attributes?: KeyValueType[]; }; export type AttributesFormProps = { form: UseFormReturn; save?: (model: AttributeForm) => void; reset?: () => void; fineGrainedAccess?: boolean; name?: string; isDisabled?: boolean; }; export const AttributesForm = ({ form, reset, save, fineGrainedAccess, name = "attributes", isDisabled = false, }: AttributesFormProps) => { const noSaveCancelButtons = !save && !reset; const { handleSubmit } = form; return ( {!noSaveCancelButtons && ( )} ); };