import { a3 as o, am as m, H as t, cC as c, cj as l, ck as n, cS as r, fq as s, fr as h } from "./56c67d3b.js";
import { getStyle as D, disabledDate as x } from "./85fb0bcf.js";
import { useUIView as f } from "./4cac7a5d.js";
import S, { useContext as u } from "react";
import { timeZoneOptions as y } from "./381f866e.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; 
`, C = o(h)`
  width: 100%;
  .ant-select-selector {
    font-size: 14px;
    line-height: 1.5;
  }
`, $ = S.lazy(() => import("./ee976bb7.js").then((e) => ({
  default: e.DateMobileUIView
}))), Z = (e) => {
  const a = u(m), d = Array.isArray(e.placeholder) ? e.placeholder[0] : e.placeholder;
  return f(/* @__PURE__ */ t($, {
    ...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) => x(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(C, {
        options: y.filter((i) => i.value !== "UserChoice"),
        placeholder: "Select Time Zone",
        defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone,
        onChange: e.onClickDateTimeZone
      })
    })
  }));
};
export {
  Z as DateUIView
};
