var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/pisellDateTimeDisplay/utils/relativeDay.ts
var relativeDay_exports = {};
__export(relativeDay_exports, {
  getRelativeDay: () => getRelativeDay,
  getRelativeDayLabel: () => getRelativeDayLabel
});
module.exports = __toCommonJS(relativeDay_exports);
var import_localeUtils = require("./localeUtils");
var LABELS_ZH = {
  today: "今天",
  yesterday: "昨天",
  tomorrow: "明天"
};
var LABELS_EN = {
  today: "Today",
  yesterday: "Yesterday",
  tomorrow: "Tomorrow"
};
function getRelativeDay(date, reference) {
  const d = date.startOf("day");
  const r = reference.startOf("day");
  const diff = d.diff(r, "day");
  if (diff === 0) return "today";
  if (diff === 1) return "tomorrow";
  if (diff === -1) return "yesterday";
  return null;
}
function getRelativeDayLabel(day, locale) {
  const resolvedLocale = locale ?? (0, import_localeUtils.getDayjsLocale)();
  const isZh = (0, import_localeUtils.isChinese)(resolvedLocale);
  return isZh ? LABELS_ZH[day] : LABELS_EN[day];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getRelativeDay,
  getRelativeDayLabel
});
