
/**
 *   WARNING: This file is intended to be used within MySheerID.
 *   This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
 */ 
/**
 *   VERSION: 2.239.0-alpha.0
 *   BUILD_TIMESTAMP: 1780013005605
 *   BUILD_DATE: Fri May 29 2026 00:03:25 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 3344b6c0fd9fa858907db310cfb1ef5e0d224da2
 */
import { i as h, h as N, r as g, j as a, P as j, u as n, g as l, F as m, e as E, Y as M, V as f, k as i, b as I } from "../_mysheerid-preview.js";
import { F, L as P, P as y, a as k, M as T, C as L } from "./CaptchaComponent-D-uHsjvA.js";
import { A as R } from "./AddressComponent-DUqzTLlm.js";
import { P as A } from "./PostalCodeComponent-CAw364H-.js";
import { E as V, P as B } from "./PersonalInfoStepSubmitButton-Z9sp6sjQ.js";
import { C as q } from "./ChangeLocaleComponent-B5F9Azun.js";
import { P as D } from "./PersonalInfoStepWrapper-DgSuVlBj.js";
const H = ({ verificationService: e }) => {
  const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, p = N(r), u = I(), d = (s, C) => {
    const b = i(
      o,
      (x) => {
        x[s] = C;
      }
    );
    e.updateViewModel(b);
  };
  return g.useEffect(() => {
    d("statuses", r.availableStatuses);
  }, []), /* @__PURE__ */ a.jsxs(
    D,
    {
      verificationService: e,
      step: r.currentStep,
      children: [
        /* @__PURE__ */ a.jsx(
          j,
          {
            verificationService: e,
            classNameIdentifier: "mover-personal-info"
          }
        ),
        /* @__PURE__ */ a.jsx(q, { verificationService: e }),
        /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
          /* @__PURE__ */ a.jsx(
            F,
            {
              value: o.firstName,
              isErrored: !!t.firstName,
              disabled: l("firstName")?.disabled,
              onChange: (s) => {
                d("firstName", s), n("firstName", s, e);
              }
            }
          ),
          /* @__PURE__ */ a.jsx(
            P,
            {
              value: o.lastName,
              isErrored: !!t.lastName,
              disabled: l("lastName")?.disabled,
              onChange: (s) => {
                d("lastName", s), n("lastName", s, e);
              }
            }
          )
        ] }),
        /* @__PURE__ */ a.jsx(
          R,
          {
            value: o.address1,
            isErrored: !!t.address1,
            errorId: t.address1,
            onChange: (s) => {
              d("address1", s), n("address1", s, e);
            },
            label: /* @__PURE__ */ a.jsx(m, { id: "streetAddress", defaultMessage: "Street Address" }),
            isRequired: !0,
            disabled: l("address1")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(
          A,
          {
            value: o.postalCode,
            isErrored: !!t.postalCode,
            disabled: l("postalCode")?.disabled,
            onChange: (s) => {
              d("postalCode", s), n("postalCode", s, e);
            }
          }
        ),
        /* @__PURE__ */ a.jsx(
          V,
          {
            value: o.email,
            isErrored: !!t.email,
            explanation: /* @__PURE__ */ a.jsx(
              m,
              {
                id: "emailExplanation",
                defaultMessage: "Needed to send you your unique code"
              }
            ),
            onChange: (s) => {
              d("email", s), n("email", s, e);
            },
            onKeyDown: (s) => E(s),
            disabled: l("email")?.disabled
          }
        ),
        e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
          y,
          {
            isRequired: !!e.programTheme.smsLoopEnabled,
            value: o.phoneNumber,
            isErrored: !!t.phoneNumber,
            onChange: (s) => {
              d("phoneNumber", s), n("phoneNumber", s, e);
            },
            selectedCountryCode: o.countryChoice && o.countryChoice.value,
            disabled: l("phoneNumber")?.disabled
          }
        ) : null,
        u.customFormFields.map((s) => /* @__PURE__ */ a.jsx(k, { config: s, verificationService: e })),
        /* @__PURE__ */ a.jsx(
          T,
          {
            verificationService: e,
            isErrored: !!t.marketConsentValue,
            onChange: (s) => {
              d("metadata", {
                ...e.viewModel.metadata,
                marketConsentValue: s
              }), n("marketConsentValue", s, e);
            },
            viewModel: o,
            disabled: l("marketConsentValue")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(M, { verificationService: e, suffix: "CollectAboveSubmit" }),
        /* @__PURE__ */ a.jsx(
          L,
          {
            verificationService: e,
            isErrored: !!t.captchaToken
          }
        ),
        /* @__PURE__ */ a.jsx(
          B,
          {
            step: f.collectMoverPersonalInfo,
            verificationService: e,
            viewModel: o,
            failedInstantMatch: p,
            buttonText: /* @__PURE__ */ a.jsx(
              m,
              {
                id: "step.personalInfo.submitButtonText",
                defaultMessage: "Verify My Recent Mover Status"
              }
            )
          }
        )
      ]
    }
  );
}, J = h(H);
export {
  J as default
};
