import { a3 as l, am as i, H as a, cC as r, cS as c, c5 as s, fr as d, fy as h } from "./56c67d3b.js";
import { getStyle as f } from "./85fb0bcf.js";
import { useUIView as m } from "./4cac7a5d.js";
import g, { useContext as u } from "react";
import { timeZoneOptions as x } from "./381f866e.js";
import "react-dom";
const {
  RangePicker: C
} = h, y = l((e) => /* @__PURE__ */ a(C, {
  ...e
}))`
  width: 100%;
  ${(e) => e.$style && f(e.$style)}
`, I = l(d)`
  width: 300px; 
  margin: 10px 0px;
  .ant-select-selector {
    font-size: 14px;
    line-height: 1.5;
  }
`, R = g.lazy(() => import("./34b5d566.js").then((e) => ({
  default: e.TimeRangeMobileUIView
}))), b = (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(y, {
    ...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(I, {
      placeholder: "Select Time Zone",
      options: x.filter((t) => t.value !== "UserChoice"),
      defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone,
      onChange: e.handleTimeRangeZoneChange
    })
  }));
};
export {
  b as TimeRangeUIView
};
