
/**
 *   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 I, g as r, R as S, j as t, F as o } from "../sheerid.js";
import { F as j } from "./FormFieldInputSelect-eZgsxRw0.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
};
