
/**
 *   VERSION: 2.239.0-alpha.0
 *   BUILD_TIMESTAMP: 1780012993002
 *   BUILD_DATE: Fri May 29 2026 00:03:13 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 3344b6c0fd9fa858907db310cfb1ef5e0d224da2
 */
import { j as s, L as n, F as l, b as r, i as j, R as N, M as y, h as S, u as g, s as f, Q as C, V as a, n as w } from "../sheerid.js";
import { S as M } from "./SSN-BohEQwhn.js";
import { C as _ } from "./ChangeLocaleComponent-D317H5S8.js";
const k = ({ useSsn: e, useDocUpload: d, verificationService: c }) => /* @__PURE__ */ s.jsxs("div", { id: "sid-ssn-choice", className: "sid-ssn-choice-container sid-l-container sid-l-horz-center", children: [
  /* @__PURE__ */ s.jsxs("div", { role: "main", children: [
    /* @__PURE__ */ s.jsxs("div", { className: "sid-header", children: [
      /* @__PURE__ */ s.jsx("div", { className: "sid-ssn-choice-logo-container sid-l-horz-center", children: /* @__PURE__ */ s.jsx(n, { verificationService: c }) }),
      /* @__PURE__ */ s.jsx("div", { className: "sid-header__title sid-l-horz-center", children: /* @__PURE__ */ s.jsx(
        l,
        {
          id: "step.collectSocialSecurityNumber.selectOption",
          defaultMessage: "Select an option",
          tagName: "h1"
        }
      ) })
    ] }),
    /* @__PURE__ */ s.jsx("div", { className: "sid-ssn-choice__choice1 sid-l-space-top-lg", children: /* @__PURE__ */ s.jsx(
      "button",
      {
        type: "button",
        onClick: e,
        className: "sid-btn sid-ssn-choice-one-btn sid-btn--light sid-l-full-width sid-use-ssn",
        children: /* @__PURE__ */ s.jsx(
          l,
          {
            id: "step.collectSocialSecurityNumber.useSsn",
            defaultMessage: "Verify using your social security number"
          }
        )
      }
    ) }),
    /* @__PURE__ */ s.jsx("div", { className: "sid-ssn-choice__choice2 sid-l-space-top-md", children: /* @__PURE__ */ s.jsx(
      "button",
      {
        type: "button",
        onClick: d,
        className: "sid-btn sid-ssn-choice-two-btn sid-btn--light sid-l-full-width sid-use-doc-upload",
        children: /* @__PURE__ */ s.jsx(
          l,
          {
            id: "step.collectSocialSecurityNumber.uploadDoc",
            defaultMessage: "Upload a document"
          }
        )
      }
    ) })
  ] }),
  /* @__PURE__ */ s.jsx("div", { className: "sid-ssn-choice__footer sid-l-space-top-lg", children: /* @__PURE__ */ s.jsx(r, { verificationService: c }) })
] }), F = k, V = ({ verificationService: e }) => {
  const [d, c] = N.useState(!0), i = e.viewModel, { fieldValidationErrors: u } = e, o = () => e.submitStep(
    a.cancelSocialSecurityNumber,
    i,
    e.verificationResponse
  ), m = (t, b) => {
    const p = w(
      i,
      (x) => {
        x[t] = b;
      }
    );
    e.updateViewModel(p);
  }, h = i.socialSecurityNumber && i.socialSecurityNumber.toString().length === 9;
  return d ? /* @__PURE__ */ s.jsx(
    F,
    {
      useSsn: () => c(!1),
      useDocUpload: o,
      verificationService: e
    }
  ) : /* @__PURE__ */ s.jsxs(
    "div",
    {
      id: "sid-step-social-security",
      className: "sid-social-sercurity-number-container sid-l-container sid-l-horz-center",
      children: [
        /* @__PURE__ */ s.jsxs("div", { role: "main", children: [
          /* @__PURE__ */ s.jsxs("div", { className: "sid-header", children: [
            /* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-logo-container sid-l-horz-center", children: /* @__PURE__ */ s.jsx(n, { verificationService: e }) }),
            /* @__PURE__ */ s.jsx(y, { align: "center", children: /* @__PURE__ */ s.jsx(
              l,
              {
                id: "step.collectSocialSecurityNumber.title",
                defaultMessage: "Enter your social security number",
                tagName: "h1"
              }
            ) }),
            /* @__PURE__ */ s.jsx(_, { verificationService: e }),
            /* @__PURE__ */ s.jsx("div", { className: "sid-ssn-wrapper", children: /* @__PURE__ */ s.jsx(
              M,
              {
                value: i.socialSecurityNumber,
                onChange: (t) => {
                  m("socialSecurityNumber", t), g(
                    "socialSecurityNumber",
                    t,
                    e
                  );
                },
                isErrored: !!u[S.socialSecurityNumber],
                placeholder: "000-00-0000"
              }
            ) })
          ] }),
          /* @__PURE__ */ s.jsx("div", { className: "sid-form-region sid-submit-wrapper sid-l-space-top-md", children: /* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-submit sid-submit", children: /* @__PURE__ */ s.jsx(
            "button",
            {
              id: "sid-submit-wrapper__collect-info",
              onClick: () => C(
                i,
                e,
                a.collectSocialSecurityNumber
              ),
              type: "submit",
              className: `sid-btn sid-social-security-number-submit-btn sid-btn--dark sid-l-full-width ${h ? "" : "sid-btn--disabled-like"}`,
              "aria-label": "submit",
              ref: (t) => f("submitButton", t),
              children: /* @__PURE__ */ s.jsx(l, { id: "proceed", defaultMessage: "Proceed" })
            }
          ) }) }),
          /* @__PURE__ */ s.jsx(
            "div",
            {
              className: "sid-form-region sid-social-security-number-upload-instead-btn sid-l-space-top-md",
              role: "button",
              tabIndex: 0,
              onKeyUp: o,
              onClick: o,
              children: /* @__PURE__ */ s.jsx("div", { className: "sid-social-security-number-upload-instead-text sid-h-link-like", children: /* @__PURE__ */ s.jsx(
                l,
                {
                  id: "step.collectSocialSecurityNumber.uploadInstead",
                  defaultMessage: "Upload a document instead"
                }
              ) })
            }
          )
        ] }),
        /* @__PURE__ */ s.jsx(r, { verificationService: e })
      ]
    }
  );
}, R = j(V);
export {
  R as default
};
