import React from "react"; import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormGroup } from "@patternfly/react-core"; import { CodeEditor, Language } from "@patternfly/react-code-editor"; import { HelpItem } from "../help-enabler/HelpItem"; import type { ComponentProps } from "./components"; import { convertToHyphens } from "../../util"; export const ScriptComponent = ({ name, label, helpText, defaultValue, }: ComponentProps) => { const { t } = useTranslation("dynamic"); const { control } = useFormContext(); return ( {helpText}} forLabel={t(label!)} forID={name!} /> } fieldId={name!} > ( )} /> ); };