export type TimelineStatusFilter = "all" | "active" | "service" | "retired";

export type TimelineDateAction = {
  key: string;
  label: string;
  deltaDays: number | null;
  icon?: "left" | "right";
  className?: string;
};

export const timelineCopy = {
  title: "Harmonogram",
  filters: {
    searchLabel: "Szukaj",
    searchPlaceholder: "Sprzęt, klient, projekt, S/N albo TAG",
    customerLabel: "Filtr klienta",
    customerPlaceholder: "Nazwa klienta w rezerwacji",
    statusLabel: "Status sprzętu",
    mobileFilterOpenLabel: "Pokaż filtry",
    mobileFilterCloseLabel: "Ukryj filtry"
  },
  summary: {
    visibleDevicesSuffix: "urządzeń w widoku",
    daysSuffix: "dni",
    bookingsSuffix: "rezerwacji"
  },
  refreshButton: "Odśwież",
  loadingTimeline: "Ładowanie osi czasu...",
  refreshingTimeline: "Odświeżanie timeline..."
} as const;

export const timelineStatusOptions: Array<{ value: TimelineStatusFilter; label: string }> = [
  { value: "all", label: "Wszystkie statusy" },
  { value: "active", label: "Tylko aktywne" },
  { value: "service", label: "Tylko serwis" },
  { value: "retired", label: "Tylko wycofane" }
];

export const timelineDateActions: TimelineDateAction[] = [
  { key: "today", label: "Dziś", deltaDays: null },
  { key: "previous-week", label: "Tydzień", deltaDays: -7, icon: "left", className: "xl:w-[116px] xl:px-3" },
  { key: "next-week", label: "Tydzień", deltaDays: 7, icon: "right", className: "xl:w-[116px] xl:px-3" },
  { key: "previous-month", label: "Miesiąc", deltaDays: -30, icon: "left", className: "xl:w-[116px] xl:px-3" },
  { key: "next-month", label: "Miesiąc", deltaDays: 30, icon: "right", className: "xl:w-[116px] xl:px-3" }
];

export const timelineToolbarStyles = {
  cardClassName: "runtime-timeline-toolbar p-2 sm:p-3",
  desktopGridClassName: "runtime-timeline-toolbar-grid grid min-w-0 gap-3 xl:grid-cols-[220px_220px_340px] xl:items-end",
  floatingLabelClassName: "absolute -top-2 left-3 z-10 bg-panel px-1 text-[11px] font-semibold text-ink",
  inputClassName: "runtime-timeline-input h-[36px] min-w-0 pt-2.5",
  combinedFilterClassName: "runtime-timeline-status-box relative flex h-[36px] min-w-0 items-center gap-3 rounded-xl border border-line bg-white px-3",
  statusSelectClassName: "min-w-0 flex-1 bg-transparent text-sm text-ink outline-none",
  dateActionsClassName: "runtime-timeline-date-actions flex flex-wrap gap-2 xl:flex-nowrap",
  inlineContainerClassName: "flex min-w-0 flex-wrap items-center gap-2 xl:flex-nowrap"
} as const;
