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/formatTime.ts
var formatTime_exports = {};
__export(formatTime_exports, {
  formatTime: () => formatTime
});
module.exports = __toCommonJS(formatTime_exports);
function formatTime(time, config) {
  const {
    use12Hour = false,
    showSeconds = false,
    padHour = false,
    onlyShowHour = false
  } = config || {};
  if (onlyShowHour) {
    return padHour ? time.format("HH") : time.format("H");
  }
  if (use12Hour) {
    const hourFormat2 = padHour ? "hh" : "h";
    const timeFormat2 = showSeconds ? `${hourFormat2}:mm:ss A` : `${hourFormat2}:mm A`;
    return time.format(timeFormat2);
  }
  const hourFormat = padHour ? "HH" : "H";
  const timeFormat = showSeconds ? `${hourFormat}:mm:ss` : `${hourFormat}:mm`;
  return time.format(timeFormat);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  formatTime
});
