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/plus/salesSdk/adjustTime/i18n.ts
var i18n_exports = {};
__export(i18n_exports, {
  formatDurationI18n: () => formatDurationI18n,
  t: () => t
});
module.exports = __toCommonJS(i18n_exports);
var import_utils = require("@pisell/utils");
var formatDurationI18n = (minutes) => {
  const total = Math.max(0, Math.ceil(minutes));
  const days = Math.floor(total / 1440);
  const hours = Math.floor(total % 1440 / 60);
  const mins = total % 60;
  const parts = [];
  if (days) {
    parts.push(
      `${days} ${import_utils.locales.getText(
        days === 1 ? "pisell2.adjust-time.day-one" : "pisell2.adjust-time.day-other"
      )}`
    );
  }
  if (hours) {
    parts.push(
      `${hours} ${import_utils.locales.getText(
        hours === 1 ? "pisell2.adjust-time.hour-one" : "pisell2.adjust-time.hour-other"
      )}`
    );
  }
  if (mins || !parts.length) {
    parts.push(
      `${mins} ${import_utils.locales.getText(
        mins === 1 ? "pisell2.adjust-time.minute-one" : "pisell2.adjust-time.minute-other"
      )}`
    );
  }
  return parts.join(" ");
};
var t = (key) => import_utils.locales.getText(key);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  formatDurationI18n,
  t
});
