
/**
 *   VERSION: 2.240.0-alpha.1
 *   BUILD_TIMESTAMP: 1780360168537
 *   BUILD_DATE: Tue Jun 02 2026 00:29:28 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 758cedd37e00f49a728d704d9ed36884f0f12d79
 */
import { i as p, g as C, j as e, F as d } from "../sheerid.js";
import { F as f } from "./FormFieldText-CPwStdCx.js";
const m = ({
  value: a,
  isErrored: t,
  onChange: l,
  explanation: o,
  intl: i,
  required: r = !0,
  // backwards compatibility. TODOv2 make this the same as other fields
  placeholder: s = "",
  disabled: n = !1
}) => C("postalCode")?.hidden ? null : /* @__PURE__ */ e.jsx(
  f,
  {
    fieldId: "postal-code",
    refId: "postalCode",
    pattern: "[a-zA-Z0-9 ]*",
    value: a,
    onChange: l,
    placeholder: s || i.formatHTMLMessage({ id: "postalCodePlaceholder", defaultMessage: "Postal Code" }),
    label: /* @__PURE__ */ e.jsx(d, { id: "postalCode", defaultMessage: "Postal Code" }),
    errorMessage: t && /* @__PURE__ */ e.jsx(
      d,
      {
        id: "errorId.invalidPostalCode",
        defaultMessage: "Invalid postal code"
      }
    ),
    showPlaceholderAndHideLabel: !!s,
    required: r,
    explanation: o && o,
    disabled: n,
    autoComplete: "postal-code"
  }
), F = p(m);
export {
  F as P
};
