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/formatWeekday.ts
var formatWeekday_exports = {};
__export(formatWeekday_exports, {
  formatWeekday: () => formatWeekday
});
module.exports = __toCommonJS(formatWeekday_exports);
var import_localeUtils = require("./localeUtils");
function formatWeekday(weekday, config) {
  const { full = false, singleLetter = false, trailingComma = false } = config || {};
  const locale = weekday.locale();
  const isChinese = (0, import_localeUtils.isChinese)(locale);
  const appendComma = (s) => trailingComma ? isChinese ? `${s}，` : `${s},` : s;
  if (singleLetter) {
    if (isChinese) {
      const weekdayMap = ["日", "一", "二", "三", "四", "五", "六"];
      return appendComma(weekdayMap[weekday.day()]);
    }
    return appendComma(weekday.format("dd").charAt(0));
  }
  if (full) {
    return appendComma(weekday.format("dddd"));
  }
  return appendComma(weekday.format("ddd"));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  formatWeekday
});
