import { X as o, af as n, F as i, cm as m, di as r, fn as c, f3 as d } from "./603b75d9.js";
import { getStyle as s } from "./3e83ebec.js";
import { useUIView as h } from "./32abb214.js";
import f, { useContext as u } from "react";
import { timeZoneOptions as x } from "./d09c8993.js";
import "react-dom";
const y = o(c)`
  width: 100%;
  ${(e) => e.$style && s(e.$style)}
`, T = f.lazy(() => import("./9063973e.js").then((e) => ({
  default: e.TimeMobileUIView
}))), g = o(d)`
  width: 300px;
  margin: 10px 0; 
  .ant-select-selector {
    font-size: 14px; 
    padding: 8px; 
  }
`, Z = (e) => {
  const t = u(n), l = Array.isArray(e.placeholder) ? e.placeholder[0] : e.placeholder;
  return h(/* @__PURE__ */ i(T, {
    ...e
  }), /* @__PURE__ */ i(y, {
    ...m.omit(e, "format"),
    ref: e.viewRef,
    hideDisabledOptions: !0,
    inputReadOnly: r(t == null ? void 0 : t.getAppSettings().maxWidth),
    placeholder: l,
    renderExtraFooter: () => e.timeZone === "UserChoice" && /* @__PURE__ */ i(g, {
      placeholder: "Select Time Zone",
      options: x.filter((a) => a.value !== "UserChoice"),
      onChange: e == null ? void 0 : e.handleTimeZoneChange,
      defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone
    })
  }));
};
export {
  Z as TimeUIView
};
