import { createElement, useEffect, useRef } from "react"; interface Props { /** Render the captcha widget. When false (or unconfigured) nothing is rendered. */ enabled: boolean; /** Active self-hosted provider. Defaults to mCaptcha for compatibility. */ provider?: "mcaptcha" | "cap"; /** Public base URL of the self-hosted captcha instance. */ instanceUrl?: string; /** Public sitekey for this surface. */ sitekey?: string; } // mCaptcha's vanilla glue mounts the widget into an element with this id and // injects a hidden into the enclosing