import { useEffect, useRef } from "react"; interface Props { /** Render the mCaptcha widget. When false (or unconfigured) nothing is rendered. */ enabled: boolean; /** Public base URL of the self-hosted mCaptcha instance (web config / MCAPTCHA_INSTANCE_URL). */ instanceUrl?: string; /** Public sitekey for this surface (e.g. MCAPTCHA_SITEKEY_LOGIN). */ sitekey?: string; } // mCaptcha's vanilla glue mounts the widget into an element with this id and // injects a hidden into the enclosing