import { cG as g, bQ as d, bR as u, dw as p, c9 as n, co as m, f4 as b, f5 as l } from "./684d2f28.js";
import { focusMethod as x, blurMethod as f } from "./d6402597.js";
import "react";
import "react-dom";
const D = (r, t, i) => {
  t(r).then(() => i("change"));
}, v = (r, t, i) => {
  const c = t === "" ? void 0 : t, e = d(i === "" ? void 0 : i, u), o = d(c, u);
  return r && r.isValid() && (r.isAfter(e, "date") || r.isBefore(o, "date"));
}, T = (r, t) => {
  const i = r === "" ? void 0 : r, a = d(t === "" ? void 0 : t, p), e = d(i, p);
  return {
    disabledHours: () => {
      let o = [];
      return e.isValid() && (o = [...o, ...n.range(0, e.hour())]), a.isValid() && (o = [...o, ...n.range(a.hour() + 1, 24)]), o;
    },
    disabledMinutes: (o) => e.isValid() && e.hour() === o ? n.range(0, e.minute()) : a.isValid() && a.hour() === o ? n.range(a.minute() + 1, 60) : [],
    disabledSeconds: (o, s) => e.isValid() && e.hour() === o && e.minute() === s ? n.range(0, e.second()) : a.isValid() && a.hour() === o && a.minute() === s ? n.range(a.second() + 1, 60) : []
  };
}, V = (r) => m`
    border-radius: ${r.radius};
    padding: ${r.padding};
    &:not(.ant-picker-disabled) {
      border-color: ${r.border};
      background-color: ${r.background};

      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" : b(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" : b(r.text) ? l(r.text, 0.1) : r.text};
      }

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