
/**
 *   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 p, g as C, j as e, F as d } from "../_mysheerid-preview.js";
import { F as f } from "./FormFieldText-BEmRFdkH.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
};
