import { X as l, af as d, F as a, cm as h, di as m, bU as r, c5 as o, c6 as c, f3 as s, f2 as f } from "./603b75d9.js";
import { getStyle as x, disabledDate as D } from "./3e83ebec.js";
import { useUIView as u } from "./32abb214.js";
import g, { useContext as S } from "react";
import { timeZoneOptions as y } from "./d09c8993.js";
import "react-dom";
const {
  RangePicker: C
} = f, w = l(C)`
  width: 100%;
  box-shadow: ${(e) => `${e.$style.boxShadow} ${e.$style.boxShadowColor}`};
  ${(e) => e.$style && x(e.$style)}
`, I = l(s)`
  width: 400px; 
  margin: 10px 0px;
  .ant-select-selector {
    font-size: 14px;
    line-height: 1.5;
  }
`, b = l.div`
  text-align: center;
`, R = g.lazy(() => import("./766bc20d.js").then((e) => ({
  default: e.DateRangeMobileUIView
}))), A = (e) => {
  const n = S(d);
  let i;
  return Array.isArray(e.placeholder) ? i = e.placeholder : i = [e.placeholder || "Start Date", e.placeholder || "End Date"], u(/* @__PURE__ */ a(R, {
    ...e
  }), /* @__PURE__ */ a(w, {
    ...h.omit(e, "onChange", "format"),
    ref: e.viewRef,
    value: [e.start, e.end],
    disabledDate: (t) => D(t, e.minDate, e.maxDate),
    onCalendarChange: (t) => {
      e.onChange(t == null ? void 0 : t[0], t == null ? void 0 : t[1]);
    },
    inputReadOnly: m(n == null ? void 0 : n.getAppSettings().maxWidth),
    suffixIcon: r(e.suffixIcon) && e.suffixIcon,
    placeholder: i,
    minDate: e.minDate ? o(e.minDate, c) : void 0,
    maxDate: e.maxDate ? o(e.maxDate, c) : void 0,
    hourStep: e.hourStep,
    minuteStep: e.minuteStep,
    secondStep: e.secondStep,
    renderExtraFooter: () => e.timeZone === "UserChoice" && /* @__PURE__ */ a(b, {
      children: /* @__PURE__ */ a(I, {
        options: y.filter((t) => t.value !== "UserChoice"),
        placeholder: "Select Time Zone",
        defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone,
        onChange: e == null ? void 0 : e.onClickDateRangeTimeZone
      })
    })
  }));
};
export {
  A as DateRangeUIView
};
