import { getStyle as o, disabledDate as c } from "./f2000b8a.js";
import { useUIView as i } from "./6aa2c0e1.js";
import { b9 as d, bg as r, V as l, c9 as s, d4 as f, bD as h, f6 as g } from "./684d2f28.js";
import u, { useContext as D } from "react";
import "./d6402597.js";
import "react-dom";
const {
  RangePicker: x
} = g, I = d(x)`
  width: 100%;
  ${(e) => e.$style && o(e.$style)}
`, b = u.lazy(() => import("./0071d431.js").then((e) => ({
  default: e.DateRangeMobileUIView
}))), k = (e) => {
  const t = D(r);
  let n;
  return Array.isArray(e.placeholder) ? n = e.placeholder : n = [e.placeholder || "Start Date", e.placeholder || "End Date"], i(/* @__PURE__ */ l(b, {
    ...e
  }), /* @__PURE__ */ l(I, {
    ...s.omit(e, "onChange"),
    ref: e.viewRef,
    value: [e.start, e.end],
    disabledDate: (a) => c(a, e.minDate, e.maxDate),
    onCalendarChange: (a) => {
      e.onChange(a == null ? void 0 : a[0], a == null ? void 0 : a[1]);
    },
    inputReadOnly: f(t == null ? void 0 : t.getAppSettings().maxWidth),
    suffixIcon: h(e.suffixIcon) && e.suffixIcon,
    placeholder: n
  }));
};
export {
  k as DateRangeUIView
};
