
/**
 *   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.240.0-alpha.1
 *   BUILD_TIMESTAMP: 1780360182346
 *   BUILD_DATE: Tue Jun 02 2026 00:29:42 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 758cedd37e00f49a728d704d9ed36884f0f12d79
 */
import { i as N, h as y, j as a, P as E, g as n, u as d, F as m, a4 as P, a5 as M, a1 as I, e as F, Y as L, V as T, k, b as D } from "../_mysheerid-preview.js";
import { u as c } from "./useCollectFieldsEndpoint-CeZbL8AL.js";
import { i as V } from "./FormFieldText-BEmRFdkH.js";
import { F as z, L as B, B as O, P as R, a as w, M as W, C as q } from "./CaptchaComponent-BO7aZ1L_.js";
import { E as H, P as K } from "./PersonalInfoStepSubmitButton-BYxvA1Od.js";
import { S as A } from "./StatusComponent-BsRWYxzz.js";
import { L as U } from "./LicensedProfessionalOrganizationComponent-DhWeDjU7.js";
import { P as Y } from "./PostalCodeComponent-CAw364H-.js";
import { C as G } from "./ChangeLocaleComponent-B5F9Azun.js";
import { C as J } from "./CountryComponentWrapper-CcxnPF_R.js";
import { P as Q } from "./PersonalInfoStepWrapper-dlBiMSvG.js";
const X = ({
  intl: u,
  verificationService: e
}) => {
  const o = e.viewModel, { fieldValidationErrors: t } = e, r = e.verificationResponse, C = y(r), b = o.localeChoice.value, h = D(), { availableStatuses: g } = c({
    verificationId: r.verificationId,
    currentStep: r.currentStep,
    viewModel: o
  }), x = o.countryChoice?.value, i = V(
    e.programTheme,
    x
  ), l = (s, p) => {
    const j = k(
      o,
      (f) => {
        f[s] = p;
      }
    );
    e.updateViewModel(j);
  };
  return /* @__PURE__ */ a.jsxs(
    Q,
    {
      verificationService: e,
      step: r.currentStep,
      children: [
        /* @__PURE__ */ a.jsx(
          E,
          {
            verificationService: e,
            classNameIdentifier: "licensed-professional"
          }
        ),
        /* @__PURE__ */ a.jsx(G, { verificationService: e }),
        /* @__PURE__ */ a.jsx(
          J,
          {
            verificationService: e,
            disabled: n("country")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(
          A,
          {
            segmentId: "licensed-professional",
            value: {
              value: o.statuses ? o.statuses[0] : "",
              label: o.statuses ? M(u, o.statuses[0]) : ""
            },
            isErrored: !!t.statuses,
            options: P(u, g ?? r.availableStatuses),
            disabled: i || n("statuses")?.disabled,
            explanation: i ? /* @__PURE__ */ a.jsx(m, { id: "chooseCountry", defaultMessage: "Choose a country first" }) : void 0,
            onChange: (s) => {
              const p = s ? [s.value] : [];
              l("statuses", p), d(
                "statuses",
                s ? s.value : "",
                e
              );
            }
          }
        ),
        /* @__PURE__ */ a.jsx(
          U,
          {
            isErrored: !!t.organization,
            onChange: (s) => {
              I(s, e), d("organization", s, e);
            },
            value: e.viewModel.organization,
            verificationService: e,
            disabled: n("organization")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsxs("div", { className: "sid-names", children: [
          /* @__PURE__ */ a.jsx(
            z,
            {
              value: o.firstName,
              isErrored: !!t.firstName,
              disabled: n("firstName")?.disabled,
              onChange: (s) => {
                l("firstName", s), d("firstName", s, e);
              }
            }
          ),
          /* @__PURE__ */ a.jsx(
            B,
            {
              value: o.lastName,
              isErrored: !!t.lastName,
              disabled: n("lastName")?.disabled,
              onChange: (s) => {
                l("lastName", s), d("lastName", s, e);
              }
            }
          )
        ] }),
        /* @__PURE__ */ a.jsx(
          O,
          {
            errorId: t.birthDate,
            locale: b,
            onChange: (s) => {
              l("birthDate", s), d("birthDate", s, e);
            },
            value: o.birthDate,
            disabled: n("birthDate")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(
          Y,
          {
            isErrored: !!t.postalCode,
            onChange: (s) => {
              l("postalCode", s), d("postalCode", s, e);
            },
            value: o.postalCode,
            disabled: n("postalCode")?.disabled,
            explanation: /* @__PURE__ */ a.jsx(
              m,
              {
                id: "postalCodeExplanation",
                defaultMessage: "Use the location on file with your licensing body"
              }
            )
          }
        ),
        /* @__PURE__ */ a.jsx(
          H,
          {
            value: o.email,
            isErrored: !!t.email,
            explanation: /* @__PURE__ */ a.jsx(
              m,
              {
                id: "emailExplanation",
                defaultMessage: "Needed to send you your unique code"
              }
            ),
            onChange: (s) => {
              l("email", s), d("email", s, e);
            },
            onKeyDown: (s) => F(s),
            disabled: n("email")?.disabled
          }
        ),
        e.programTheme.isSmsNotifierConfigured || e.programTheme.smsLoopEnabled ? /* @__PURE__ */ a.jsx(
          R,
          {
            isRequired: !!e.programTheme.smsLoopEnabled,
            value: o.phoneNumber,
            isErrored: !!t.phoneNumber,
            onChange: (s) => {
              l("phoneNumber", s), d("phoneNumber", s, e);
            },
            selectedCountryCode: o.countryChoice && o.countryChoice.value,
            disabled: n("phoneNumber")?.disabled
          }
        ) : null,
        h.customFormFields.map((s) => /* @__PURE__ */ a.jsx(w, { config: s, verificationService: e })),
        /* @__PURE__ */ a.jsx(
          W,
          {
            verificationService: e,
            isErrored: !!t.marketConsentValue,
            onChange: (s) => {
              l("metadata", {
                ...e.viewModel.metadata,
                marketConsentValue: s
              }), d("marketConsentValue", s, e);
            },
            viewModel: o,
            disabled: n("marketConsentValue")?.disabled
          }
        ),
        /* @__PURE__ */ a.jsx(L, { verificationService: e, suffix: "CollectAboveSubmit" }),
        /* @__PURE__ */ a.jsx(
          q,
          {
            verificationService: e,
            isErrored: !!t.captchaToken
          }
        ),
        /* @__PURE__ */ a.jsx(
          K,
          {
            step: T.collectLicensedProfessionalPersonalInfo,
            verificationService: e,
            viewModel: o,
            failedInstantMatch: C,
            buttonText: /* @__PURE__ */ a.jsx(
              m,
              {
                id: "step.personalInfo.submitButtonText",
                defaultMessage: "Verify My Licensed Professional Status"
              }
            )
          }
        )
      ]
    }
  );
}, ds = N(
  X
);
export {
  ds as default
};
