import { d6 as m, d7 as x, d8 as h, cj as n, ck as u, dT as b, cC as d, aC as g, fp as p, dC as l } from "./56c67d3b.js";
import "react";
import "react-dom";
const M = (r, t, i) => {
  t(r).then(() => i("change"));
}, D = (r, t, i) => {
  const c = t === "" ? void 0 : t, o = n(i === "" ? void 0 : i, u), e = n(c, u);
  return r && r.isValid() && (r.isAfter(o, "date") || r.isBefore(e, "date"));
}, T = (r, t) => {
  const i = r === "" ? void 0 : r, a = n(t === "" ? void 0 : t, b), o = n(i, b);
  return {
    disabledHours: () => {
      let e = [];
      return o.isValid() && (e = [...e, ...d.range(0, o.hour())]), a.isValid() && (e = [...e, ...d.range(a.hour() + 1, 24)]), e;
    },
    disabledMinutes: (e) => o.isValid() && o.hour() === e ? d.range(0, o.minute()) : a.isValid() && a.hour() === e ? d.range(a.minute() + 1, 60) : [],
    disabledSeconds: (e, s) => o.isValid() && o.hour() === e && o.minute() === s ? d.range(0, o.second()) : a.isValid() && a.hour() === e && a.minute() === s ? d.range(a.second() + 1, 60) : []
  };
}, v = (r) => g`
    border-radius: ${r.radius};
    padding: ${r.padding};
    &:not(.ant-picker-disabled) {
      border-color: ${r.border};
      background-color: ${r.background};
      border-width: ${r.borderWidth};
      border-style: ${r.borderStyle};

      input {
        color: ${r.text};

        &::-webkit-input-placeholder {
          color: ${r.text};
          opacity: 0.25;
        }
      }

      &.ant-picker-focused,
      &:hover {
        border-color: ${r.accent};
      }

      .ant-picker-suffix,
      .ant-picker-clear,
      .ant-picker-separator {
        background-color: ${r.background};
        color: ${r.text === "#222222" ? "#8B8FA3" : p(r.text) ? l(r.text, 0.2) : r.text};
      }

      .ant-picker-clear {
        inset-inline-end: 1px;
        font-size: 16px;
      }

      .ant-picker-clear:hover {
        color: ${r.text === "#222222" ? "#8B8FA3" : p(r.text) ? l(r.text, 0.1) : r.text};
      }

      .ant-picker-active-bar {
        background-color: ${r.accent};
      }
    }
  `, V = (r) => g`
    color: ${r.text};
    background-color: ${r.background};
    border-radius: ${r.radius};
    border-color: ${r.border};
  `, C = m([x, h]);
export {
  C as dateRefMethods,
  D as disabledDate,
  T as disabledTime,
  V as getMobileStyle,
  v as getStyle,
  M as handleDateChange
};
