'use strict';

const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
const index_module = require('./index.module-f8c8495f.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 = domContextHooks_module.d(REGISTRATION_FORM_STATE_CONTEXT_INTERNAL);
  const parentValue = domContextHooks_module.d(REGISTRATION_FORM_STATE_CONTEXT);
  if (!parent)
    return [undefined, undefined];
  return [parentValue, parent[1]];
}
function useRegistrationFormState(formState) {
  const host = index_module._();
  const [registrationFormState, setRegistrationFormState] = domContextHooks_module.y(host, REGISTRATION_FORM_STATE_CONTEXT, formState);
  domContextHooks_module.y(host, REGISTRATION_FORM_STATE_CONTEXT_INTERNAL, [
    registrationFormState,
    setRegistrationFormState,
  ]);
  return { registrationFormState, setRegistrationFormState };
}

exports.REGISTRATION_FORM_STATE_CONTEXT = REGISTRATION_FORM_STATE_CONTEXT;
exports.useRegistrationForm = useRegistrationForm;
exports.useRegistrationFormState = useRegistrationFormState;
