import { i as d, y } from './dom-context-hooks.module-50442785.js';
import { _ } from './index.module-b23fdad8.js';

const REGISTRATION_FORM_STATE_CONTEXT = "sq:registration-form-state";
const REGISTRATION_FORM_STATE_CONTEXT_INTERNAL = "sq:registration-form-state-internal";
function useRegistrationForm() {
  const parent = d(REGISTRATION_FORM_STATE_CONTEXT_INTERNAL);
  const parentValue = d(REGISTRATION_FORM_STATE_CONTEXT);
  if (!parent)
    return [undefined, undefined];
  return [parentValue, parent[1]];
}
function useRegistrationFormState(formState) {
  const host = _();
  const [registrationFormState, setRegistrationFormState] = y(host, REGISTRATION_FORM_STATE_CONTEXT, formState);
  y(host, REGISTRATION_FORM_STATE_CONTEXT_INTERNAL, [
    registrationFormState,
    setRegistrationFormState,
  ]);
  return { registrationFormState, setRegistrationFormState };
}

export { REGISTRATION_FORM_STATE_CONTEXT as R, useRegistrationForm as a, useRegistrationFormState as u };
