
/**
 *   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 { b7 as F, d as s, j as n } from "../_mysheerid-preview.js";
import { I as C } from "./InputText-U-PGva3s.js";
import { F as j } from "./FormFieldLayout-DDEEmlGC.js";
const l = (t, r = void 0) => (F(t) || []).length >= 2 && !r, v = ({
  fieldId: t,
  value: r,
  onChange: a,
  placeholder: m,
  label: d,
  errorMessage: o,
  showPlaceholderAndHideLabel: e = !1,
  required: i = !0,
  explanation: u = "",
  ...p
}) => {
  const x = `sid-${s(t)}-error`;
  return /* @__PURE__ */ n.jsx(
    j,
    {
      fieldId: t,
      label: d,
      errorMessage: o,
      showPlaceholderAndHideLabel: e,
      isRequired: i,
      explanation: u,
      children: /* @__PURE__ */ n.jsx(
        C,
        {
          id: s(t),
          value: r,
          onChange: (c) => a(c.target.value),
          placeholder: e ? m : "",
          hidePlaceholder: !e,
          refId: t,
          isErrored: !!o,
          required: i,
          "aria-describedby": o ? x : void 0,
          ...p
        }
      )
    }
  );
};
export {
  v as F,
  l as i
};
