import { X as l, af as i, F as a, cm as r, di as c, bU as s, f3 as d, fn as h } from "./603b75d9.js";
import { getStyle as f } from "./3e83ebec.js";
import { useUIView as m } from "./32abb214.js";
import g, { useContext as u } from "react";
import { timeZoneOptions as x } from "./d09c8993.js";
import "react-dom";
const {
  RangePicker: C
} = h, I = l((e) => /* @__PURE__ */ a(C, {
  ...e
}))`
  width: 100%;
  ${(e) => e.$style && f(e.$style)}
`, y = l(d)`
  width: 300px; 
  margin: 10px 0px;
  .ant-select-selector {
    font-size: 14px;
    line-height: 1.5;
  }
`, R = g.lazy(() => import("./9063973e.js").then((e) => ({
  default: e.TimeRangeMobileUIView
}))), Z = (e) => {
  const n = u(i);
  let o;
  return Array.isArray(e.placeholder) ? o = e.placeholder : o = [e.placeholder || "Start Date", e.placeholder || "End Date"], m(/* @__PURE__ */ a(R, {
    ...e
  }), /* @__PURE__ */ a(I, {
    ...r.omit(e, "onChange", "format"),
    value: [e.start, e.end],
    order: !0,
    hideDisabledOptions: !0,
    onCalendarChange: (t) => {
      e.onChange(t == null ? void 0 : t[0], t == null ? void 0 : t[1]);
    },
    inputReadOnly: c(n == null ? void 0 : n.getAppSettings().maxWidth),
    suffixIcon: s(e.suffixIcon) && e.suffixIcon,
    placeholder: o,
    renderExtraFooter: () => e.timeZone === "UserChoice" && /* @__PURE__ */ a(y, {
      placeholder: "Select Time Zone",
      options: x.filter((t) => t.value !== "UserChoice"),
      defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone,
      onChange: e.handleTimeRangeZoneChange
    })
  }));
};
export {
  Z as TimeRangeUIView
};
