
/**
 *   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 { h as N, _ as y, j as a, P as g, u as r, g as n, e as j, F as p, $ as E, Y as I, V as M, i as P, k as F, b as f } from "../_mysheerid-preview.js";
import { F as L, L as D, P as R, B as T, a as k, M as B, C as q } from "./CaptchaComponent-D-uHsjvA.js";
import { E as H, P as A } from "./PersonalInfoStepSubmitButton-Z9sp6sjQ.js";
import { A as V } from "./AddressComponent-DUqzTLlm.js";
import { C as K } from "./City-ZWfRdxoz.js";
import { P as O } from "./PostalCodeComponent-CAw364H-.js";
import { D as W } from "./DriverLicenseNumberComponent-Bw9LOToD.js";
import { S as c } from "./StateSelectComponent-DJIfavwM.js";
import { C as Y } from "./ChangeLocaleComponent-B5F9Azun.js";
import { P as _ } from "./PersonalInfoStepWrapper-DgSuVlBj.js";
const $ = ({
  intl: i,
  verificationService: s
}) => {
  const t = s.viewModel, { fieldValidationErrors: o } = s, m = s.verificationResponse, u = N(m), b = f(), C = t.localeChoice.value, d = (e, l) => {
    const h = F(
      t,
      (x) => {
        x[e] = l;
      }
    );
    s.updateViewModel(h);
  };
  return y(), /* @__PURE__ */ a.jsxs(
    _,
    {
      verificationService: s,
      step: m.currentStep,
      children: [
        /* @__PURE__ */ a.jsx(
          g,
          {
            verificationService: s,
            classNameIdentifier: "hybrid-identity"
          }
        ),
        /* @__PURE__ */ a.jsx(Y, { verificationService: s }),
        /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
          /* @__PURE__ */ a.jsx(
            L,
            {
              value: t.firstName,
              isErrored: !!o.firstName,
              disabled: n("firstName")?.disabled,
              onChange: (e) => {
                d("firstName", e), r("firstName", e, s);
              }
            }
          ),
          /* @__PURE__ */ a.jsx(
            D,
            {
              value: t.lastName,
              isErrored: !!o.lastName,
              disabled: n("lastName")?.disabled,
              onChange: (e) => {
                d("lastName", e), r("lastName", e, s);
              }
            }
          )
        ] }),
        /* @__PURE__ */ a.jsx(
          H,
          {
            value: t.email,
            isErrored: !!o.email,
            explanation: /* @__PURE__ */ a.jsx(
              p,
              {
                id: "emailExplanation",
                defaultMessage: "Personal email address is recommended"
              }
            ),
            onChange: (e) => {
              d("email", e), r("email", e, s);
            },
            onKeyDown: (e) => j(e),
            disabled: n("email")?.disabled
          }
        ),
        s.programTheme.isSmsNotifierConfigured || s.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
          R,
          {
            isRequired: !!s.programTheme.smsLoopEnabled,
            value: t.phoneNumber,
            isErrored: !!o.phoneNumber,
            onChange: (e) => {
              d("phoneNumber", e), r("phoneNumber", e, s);
            },
            selectedCountryCode: t.countryChoice && t.countryChoice.value,
            disabled: n("phoneNumber")?.disabled
          }
        ) : null,
        /* @__PURE__ */ a.jsx(
          T,
          {
            errorId: o.birthDate,
            locale: C,
            onChange: (e) => {
              d("birthDate", e), r("birthDate", e, s);
            },
            value: t.birthDate,
            disabled: n("birthDate")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(
          V,
          {
            isErrored: !!o.address1,
            errorId: o.address1,
            onChange: (e) => {
              d("address1", e), r("address1", e, s);
            },
            value: t.address1,
            isRequired: !0,
            disabled: n("address1")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsxs("div", { className: "sid-thirds", children: [
          /* @__PURE__ */ a.jsx(
            K,
            {
              isErrored: !!o.city,
              errorId: o.city,
              onChange: (e) => {
                d("city", e), r("city", e, s);
              },
              value: t.city,
              isRequired: !0,
              disabled: n("city")?.disabled
            }
          ),
          /* @__PURE__ */ a.jsx(
            c,
            {
              isRequired: !0,
              options: E(s.programTheme, i),
              value: t.state || void 0,
              isErrored: !!o.state,
              disabled: n("state")?.disabled,
              onChange: async (e) => {
                const l = e ? e.value : void 0;
                d("state", l), r("state", l, s);
              }
            }
          ),
          /* @__PURE__ */ a.jsx(
            O,
            {
              isErrored: !!o.postalCode,
              onChange: (e) => {
                d("postalCode", e), r("postalCode", e, s);
              },
              value: t.postalCode,
              disabled: n("postalCode")?.disabled
            }
          )
        ] }),
        /* @__PURE__ */ a.jsx(
          W,
          {
            value: t.driverLicenseNumber,
            isErrored: !!o.driverLicenseNumber,
            isRequired: !0,
            disabled: n("driverLicenseNumber")?.disabled,
            onChange: (e) => {
              d("driverLicenseNumber", e), r(
                "driverLicenseNumber",
                e,
                s
              );
            }
          }
        ),
        b.customFormFields.map((e) => /* @__PURE__ */ a.jsx(k, { config: e, verificationService: s })),
        /* @__PURE__ */ a.jsx(
          B,
          {
            verificationService: s,
            isErrored: !!o.marketConsentValue,
            onChange: (e) => {
              d("metadata", {
                ...s.viewModel.metadata,
                marketConsentValue: e
              }), r("marketConsentValue", e, s);
            },
            viewModel: t,
            disabled: n("marketConsentValue")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(I, { verificationService: s, suffix: "CollectAboveSubmit" }),
        /* @__PURE__ */ a.jsx(
          q,
          {
            verificationService: s,
            isErrored: !!o.captchaToken
          }
        ),
        /* @__PURE__ */ a.jsx(
          A,
          {
            step: M.collectHybridIdentityPersonalInfo,
            verificationService: s,
            viewModel: t,
            failedInstantMatch: u,
            buttonText: /* @__PURE__ */ a.jsx(
              p,
              {
                id: "step.personalInfo.submitButtonText",
                defaultMessage: "Verify My Identity"
              }
            )
          }
        )
      ]
    }
  );
}, ee = P($);
export {
  $ as StepHybridIdentityPersonalInfo,
  ee as StepHybridIdentityPersonalInfoComponent,
  ee as default
};
