
/**
 *   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 I, g as r, R as S, j as t, F as o } from "../_mysheerid-preview.js";
import { F as j } from "./FormFieldInputSelect-BwnUEr32.js";
const v = ({
  value: a,
  isErrored: f,
  errorId: c = "invalidStatus",
  options: e,
  onChange: d,
  intl: g,
  placeholder: i = "",
  onKeyDown: m = void 0,
  segmentId: l,
  disabled: F = !1,
  explanation: M = void 0
}) => {
  const n = `${l}-status`, u = e.length === 1, h = r("status")?.hidden || r("statuses")?.hidden;
  return S.useEffect(() => {
    u && d(e[0]);
  }, []), u || h ? null : /* @__PURE__ */ t.jsx(
    j,
    {
      fieldId: n,
      options: e,
      onChange: (s) => d(s),
      onKeyDown: m,
      value: e.find((s) => s.value === (a && a.value)),
      placeholder: i || g.formatHTMLMessage({ id: "statusPlaceholder", defaultMessage: "Status" }),
      showPlaceholderAndHideLabel: !!i,
      isRequired: !0,
      containerId: `sid-${n}`,
      label: /* @__PURE__ */ t.jsx(o, { id: "status", defaultMessage: "Status" }),
      disabled: F,
      explanation: M,
      errorMessage: f && /* @__PURE__ */ t.jsx(
        o,
        {
          id: `errorId.${c}`,
          defaultMessage: `Invalid ${l} status`
        }
      )
    }
  );
}, H = I(v);
export {
  H as S
};
