
/**
 *   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.240.0-alpha.1
 *   BUILD_TIMESTAMP: 1780360182346
 *   BUILD_DATE: Tue Jun 02 2026 00:29:42 GMT+0000 (Coordinated Universal Time)
 *   BUILD_COMMIT: 758cedd37e00f49a728d704d9ed36884f0f12d79
 */
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
};
