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