import { a3 as o, am as n, H as i, cC as r, cS as m, fy as c, fr as d } from "./56c67d3b.js";
import { getStyle as s } from "./85fb0bcf.js";
import { useUIView as h } from "./4cac7a5d.js";
import f, { useContext as u } from "react";
import { timeZoneOptions as x } from "./381f866e.js";
import "react-dom";
const y = o(c)`
  width: 100%;
  ${(e) => e.$style && s(e.$style)}
`, T = f.lazy(() => import("./34b5d566.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), a = Array.isArray(e.placeholder) ? e.placeholder[0] : e.placeholder;
  return h(/* @__PURE__ */ i(T, {
    ...e
  }), /* @__PURE__ */ i(y, {
    ...r.omit(e, "format"),
    ref: e.viewRef,
    hideDisabledOptions: !0,
    inputReadOnly: m(t == null ? void 0 : t.getAppSettings().maxWidth),
    placeholder: a,
    renderExtraFooter: () => e.timeZone === "UserChoice" && /* @__PURE__ */ i(g, {
      placeholder: "Select Time Zone",
      options: x.filter((l) => l.value !== "UserChoice"),
      onChange: e == null ? void 0 : e.handleTimeZoneChange,
      defaultValue: Intl.DateTimeFormat().resolvedOptions().timeZone
    })
  }));
};
export {
  Z as TimeUIView
};
