import { jsxs as n, jsx as r } from "react/jsx-runtime";
import { memo as w } from "react";
import a from "../../../box/Box.js";
import D from "../date-picker-input/DatePickerInput.js";
import y from "../../../calendar/Calendar.js";
import { d as j } from "../../../../de-DVQ9_7sl.js";
import { c as o } from "../../../../index-BtlgVD4m.js";
const k = w(
  ({
    header: d,
    hasInput: s,
    footer: e,
    dateFormat: m,
    inputValue: i,
    parsedInputDate: c,
    defaultMonth: p,
    calendarKey: l,
    disableDate: t,
    onInputChange: u,
    onInputBlur: v,
    onCalendarChange: b,
    onApply: f,
    onClear: g,
    captionLayout: x,
    fromYear: h,
    toYear: N
  }) => /* @__PURE__ */ n(a, { className: o("w-auto p-0", "rounded-md shadow-md", "bg-[var(--base-popover)]"), children: [
    /* @__PURE__ */ n(a, { className: o("flex flex-col gap-[var(--spacing-2)] p-[var(--spacing-2)] rounded-md"), children: [
      d && /* @__PURE__ */ r(a, { children: d }),
      s && /* @__PURE__ */ r(
        D,
        {
          dateFormat: m,
          inputValue: i,
          onInputChange: u,
          onInputBlur: v,
          autoFocus: s
        }
      ),
      /* @__PURE__ */ r(a, { className: "flex gap-[var(--spacing-4)]", children: /* @__PURE__ */ r(a, { className: "[&_.rdp-root]:shadow-none", children: /* @__PURE__ */ r(
        y,
        {
          mode: "single",
          value: c || void 0,
          defaultMonth: p,
          onChange: b,
          numberOfMonths: 1,
          disableDate: t,
          locale: j,
          captionLayout: x,
          fromYear: h,
          toYear: N
        },
        l
      ) }) })
    ] }),
    e && /* @__PURE__ */ r(
      a,
      {
        className: o(
          "border-t border-[var(--base-border)]",
          "bg-[var(--base-muted)]",
          "flex items-center justify-end gap-[var(--spacing-4)]",
          "px-[var(--spacing-3)] py-[var(--spacing-2)]",
          "rounded-bl-[var(--border-radius-md)] rounded-br-[var(--border-radius-md)]"
        ),
        children: typeof e == "function" ? e({ onApply: f, onClear: g }) : e
      }
    )
  ] })
);
k.displayName = "DatePickerDropdown";
export {
  k as default
};
//# sourceMappingURL=DatePickerDropdown.js.map
