import './Item-f4cbd6f4.js';
import { I as Item } from './index-3299c1c0.js';
import './Credentials-b84c0c5f.js';
import './Token-ba2c5d5c.js';
import './index-a0a71287.js';
import './index-2d6441ea.js';
import './ok-c9833bf3.js';
import './index-c2c33860.js';
import './index-8e333ab5.js';
import './index-f77ff597.js';

function getWarningMessage(entry) {
  var _a, _b, _c, _d, _e, _f, _g;
  const message = (_f = (_c = (_b = (_a = entry.data.body) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.description) !== null && _c !== void 0 ? _c : (_e = (_d = entry.data.body) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.type) !== null && _f !== void 0 ? _f : (_g = entry.data.body) === null || _g === void 0 ? void 0 : _g.type;
  return message ? message.replace(".", "").toLowerCase() : entry.level;
}
function hasValue(element) {
  return element.value == undefined || typeof element.value === "string";
}
function isDefined(value) {
  return value != undefined;
}
function itemToAmount(item) {
  var _a;
  return Array.isArray(item)
    ? item.reduce((r, i) => (r += i.price ? i.price : 0), 0)
    : Item.is(item)
      ? (_a = item.price) !== null && _a !== void 0 ? _a : 0
      : item;
}

export { itemToAmount as a, getWarningMessage as g, hasValue as h, isDefined as i };
