"use client";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { Button } from "@open-mercato/ui/primitives/button";
import { Kbd } from "@open-mercato/ui/primitives/kbd";
import { useT } from "@open-mercato/shared/lib/i18n/context";
const CALENDAR_SHORTCUTS = [
  { key: "T", labelKey: "customers.calendar.shortcuts.today", fallback: "Today" },
  { key: "D", labelKey: "customers.calendar.shortcuts.dayView", fallback: "Day view" },
  { key: "W", labelKey: "customers.calendar.shortcuts.week", fallback: "Week" },
  { key: "M", labelKey: "customers.calendar.shortcuts.month", fallback: "Month" },
  { key: "A", labelKey: "customers.calendar.shortcuts.agenda", fallback: "Agenda" },
  { key: "N", labelKey: "customers.calendar.shortcuts.newEvent", fallback: "New event" },
  { key: "/", labelKey: "customers.calendar.shortcuts.search", fallback: "Search" },
  { key: "?", labelKey: "customers.calendar.shortcuts.help", fallback: "Shortcuts" }
];
function CalendarFooter({ timezoneLabel, onOpenShortcuts }) {
  const t = useT();
  return /* @__PURE__ */ jsxs("footer", { className: "flex flex-wrap items-center gap-x-4 gap-y-1.5 border-t bg-muted/40 px-4 py-2", children: [
    CALENDAR_SHORTCUTS.map((shortcut) => {
      const legend = /* @__PURE__ */ jsxs(Fragment, { children: [
        /* @__PURE__ */ jsx(Kbd, { children: shortcut.key }),
        /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t(shortcut.labelKey, shortcut.fallback) })
      ] });
      if (shortcut.key === "?" && onOpenShortcuts) {
        return /* @__PURE__ */ jsx(
          Button,
          {
            type: "button",
            variant: "ghost",
            size: "sm",
            className: "h-auto gap-1.5 p-0 font-normal hover:bg-transparent",
            "aria-label": t("customers.calendar.shortcuts.title", "Keyboard shortcuts"),
            onClick: onOpenShortcuts,
            children: legend
          },
          shortcut.key
        );
      }
      return /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-1.5", children: legend }, shortcut.key);
    }),
    /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: timezoneLabel })
  ] });
}
export {
  CALENDAR_SHORTCUTS,
  CalendarFooter
};
//# sourceMappingURL=CalendarFooter.js.map
