import { jsx as u } from "react/jsx-runtime";
import r from "react";
import { getDefaultClassNames as g } from "react-day-picker";
import { c as l } from "../../../../index-BtlgVD4m.js";
const p = ({ className: n, day: d, modifiers: e, ...s }) => {
  const o = g(), a = r.useRef(null);
  return r.useEffect(() => {
    var t;
    e.focused && ((t = a.current) == null || t.focus());
  }, [e.focused]), /* @__PURE__ */ u(
    "button",
    {
      ref: a,
      "data-day": d.date.toLocaleDateString(),
      "data-selected-single": e.selected && !e.range_start && !e.range_end && !e.range_middle,
      "data-range-start": e.range_start,
      "data-range-end": e.range_end,
      "data-range-middle": e.range_middle,
      className: l(
        "items-center",
        "justify-center",
        "whitespace-nowrap",
        "rounded-md",
        "text-sm",
        "transition-all",
        "disabled:pointer-events-none",
        "disabled:opacity-50",
        "[&_svg]:pointer-events-none",
        "[&_svg:not([class*='size-'])]:size-4",
        "shrink-0",
        "[&_svg]:shrink-0",
        "focus:outline-2",
        "focus:outline-offset-1",
        "focus:outline-[var(--base-ring)]",
        "aria-invalid:border-[var(--base-destructive)]",
        "size-9",
        "hover:bg-[var(--base-accent)]",
        "hover:text-[var(--base-accent-foreground)]",
        "hover:cursor-pointer",
        "data-[selected-single=true]:bg-[var(--base-primary)]",
        "data-[selected-single=true]:text-[var(--base-primary-foreground)]",
        "data-[range-middle=true]:bg-[var(--base-accent)]",
        "data-[range-middle=true]:text-[var(--base-accent-foreground)]",
        "data-[range-start=true]:bg-[var(--base-primary)]",
        "data-[range-start=true]:text-[var(--base-primary-foreground)]",
        "data-[range-end=true]:bg-[var(--base-primary)]",
        "data-[range-end=true]:text-[var(--base-primary-foreground)]",
        "flex",
        "aspect-square",
        "min-w-(--cell-size)",
        "flex-col",
        "gap-1",
        "leading-none",
        "font-normal",
        "group-data-[focused=true]/day:relative",
        "group-data-[focused=true]/day:z-10",
        "data-[range-end=true]:rounded-md",
        "data-[range-end=true]:rounded-r-md",
        "data-[range-middle=true]:rounded-none",
        "data-[range-start=true]:rounded-md",
        "data-[range-start=true]:rounded-l-md",
        "[&>span]:text-xs",
        "[&>span]:opacity-70",
        o.day,
        n
      ),
      ...s
    }
  );
};
export {
  p as default
};
//# sourceMappingURL=CalendarDayButton.js.map
