import { hasText } from './dom';
const getLabelText = (element) => { var _a; return hasText(element) ? element.textContent : ((_a = document.querySelector(`label[for="${element.id}"]`)) === null || _a === void 0 ? void 0 : _a.textContent) || ''; };
const guid = () => [2, 1, 1, 1, 3]
  .map((count) => {
  let out = '';
  for (let i = 0; i < count; i++) {
    out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
  }
  return out;
})
  .join('-');
const mapGet = (key, obj, fallback = 'default') => obj[key] || obj[fallback] || undefined;
export { getLabelText, guid, mapGet };
//# sourceMappingURL=utils.js.map