"use client";
import { isSameWeek as l } from "../../../isSameWeek.js";
const a = [
  "domenica",
  "lunedì",
  "martedì",
  "mercoledì",
  "giovedì",
  "venerdì",
  "sabato"
];
function i(e) {
  switch (e) {
    case 0:
      return "'domenica scorsa alle' p";
    default:
      return "'" + a[e] + " scorso alle' p";
  }
}
function s(e) {
  return "'" + a[e] + " alle' p";
}
function c(e) {
  switch (e) {
    case 0:
      return "'domenica prossima alle' p";
    default:
      return "'" + a[e] + " prossimo alle' p";
  }
}
const u = {
  lastWeek: (e, r, o) => {
    const t = e.getDay();
    return l(e, r, o) ? s(t) : i(t);
  },
  yesterday: "'ieri alle' p",
  today: "'oggi alle' p",
  tomorrow: "'domani alle' p",
  nextWeek: (e, r, o) => {
    const t = e.getDay();
    return l(e, r, o) ? s(t) : c(t);
  },
  other: "P"
}, f = (e, r, o, t) => {
  const n = u[e];
  return typeof n == "function" ? n(r, o, t) : n;
};
export {
  f as formatRelative
};
