import { jsxs as u, jsx as e } from "react/jsx-runtime";
import { D as x } from "./date-range-picker-BvlE8omk.es.js";
import { F as r } from "./form-field-ClimvHF6.es.js";
import { a as g } from "./field-errors-DYvB-OZF.es.js";
const j = ({
  id: o,
  label: m,
  description: l,
  info: s,
  errors: a,
  renderError: d,
  touched: f = !1,
  isRequired: h = !1,
  isDisabled: i = !1,
  isReadOnly: n = !1,
  isInvalid: p = !1,
  direction: F = "column",
  size: t = "md",
  ...D
}) => {
  const c = f && a && Object.values(a).some(Boolean);
  return /* @__PURE__ */ u(
    r.Root,
    {
      id: o,
      direction: F,
      size: t,
      isInvalid: c || p,
      isRequired: h,
      isDisabled: i,
      isReadOnly: n,
      children: [
        /* @__PURE__ */ e(r.Label, { children: m }),
        /* @__PURE__ */ e(r.Input, { children: /* @__PURE__ */ e(
          x,
          {
            size: t,
            isDisabled: i,
            isReadOnly: n,
            ...D
          }
        ) }),
        l && /* @__PURE__ */ e(r.Description, { children: l }),
        s && /* @__PURE__ */ e(r.InfoBox, { children: s }),
        c && /* @__PURE__ */ e(r.Error, { children: /* @__PURE__ */ e(
          g,
          {
            id: `${o}-errors`,
            errors: a,
            renderError: d
          }
        ) })
      ]
    }
  );
};
j.displayName = "DateRangePickerField";
export {
  j as D
};
//# sourceMappingURL=date-range-picker-field-CGZAROT8.es.js.map
