import { jsxs as u, jsx as e } from "react/jsx-runtime";
import { D as x } from "./date-range-picker-BnbKgO1E.es.js";
import { F as r } from "./form-field-BfDU18h3.es.js";
import { F as g } from "./field-errors-D1BQvoYg.es.js";
const j = ({
  id: a,
  label: m,
  description: l,
  info: s,
  errors: o,
  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 && o && Object.values(o).some(Boolean);
  return /* @__PURE__ */ u(
    r.Root,
    {
      id: a,
      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: `${a}-errors`,
            errors: o,
            renderError: d
          }
        ) })
      ]
    }
  );
};
j.displayName = "DateRangePickerField";
export {
  j as D
};
//# sourceMappingURL=date-range-picker-field-BuI6eLMY.es.js.map
