'use strict';

require('./Item-00ce8c24.js');
const index = require('./index-76391849.js');
require('./Credentials-8e4749ab.js');
require('./Token-8c5ba5d9.js');
require('./index-d3079b93.js');
require('./index-863a0811.js');
require('./ok-97a5fd0b.js');
require('./index-c910887e.js');
require('./index-0b2930ca.js');
require('./index-f23d1d6b.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)
    : index.Item.is(item)
      ? (_a = item.price) !== null && _a !== void 0 ? _a : 0
      : item;
}

exports.getWarningMessage = getWarningMessage;
exports.hasValue = hasValue;
exports.isDefined = isDefined;
exports.itemToAmount = itemToAmount;
