import '../../../../../../../_virtual/_commonjsHelpers.mjs';
import { __exports as getOptionsFromElement$1 } from '../../../../../../../_virtual/getOptionsFromElement2.mjs';
import '../../../../../../../_virtual/optionsFromStrings.mjs';
import '../../../../../../../_virtual/defaults.mjs';
import { __exports as optionsFromStrings } from '../../../../../../../_virtual/optionsFromStrings2.mjs';
import { __exports as defaults } from '../../../../../../../_virtual/defaults2.mjs';

"use strict";

Object.defineProperty(getOptionsFromElement$1, "__esModule", {
	value: true
});

var _optionsFromStrings = optionsFromStrings;

var _optionsFromStrings2 = _interopRequireDefault(_optionsFromStrings);

var _defaults = defaults;

var _defaults2 = _interopRequireDefault(_defaults);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getOptionsFromElement(element) {
	var options = {};
	for (var property in _defaults2.default) {
		if (_defaults2.default.hasOwnProperty(property)) {
			// jsbarcode-*
			if (element.hasAttribute("jsbarcode-" + property.toLowerCase())) {
				options[property] = element.getAttribute("jsbarcode-" + property.toLowerCase());
			}

			// data-*
			if (element.hasAttribute("data-" + property.toLowerCase())) {
				options[property] = element.getAttribute("data-" + property.toLowerCase());
			}
		}
	}

	options["value"] = element.getAttribute("jsbarcode-value") || element.getAttribute("data-value");

	// Since all atributes are string they need to be converted to integers
	options = (0, _optionsFromStrings2.default)(options);

	return options;
}

var _default = getOptionsFromElement$1.default = getOptionsFromElement;

export { _default as default };
//# sourceMappingURL=getOptionsFromElement.mjs.map
