"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("../../_virtual/index10.cjs");
const index$1 = require("../inline-style-parser/index.cjs");
var hasRequiredCjs;
function requireCjs() {
  if (hasRequiredCjs) return index.__exports;
  hasRequiredCjs = 1;
  var __importDefault = index.__exports && index.__exports.__importDefault || function(mod) {
    return mod && mod.__esModule ? mod : { "default": mod };
  };
  Object.defineProperty(index.__exports, "__esModule", { value: true });
  index.__exports.default = StyleToObject;
  var inline_style_parser_1 = __importDefault(index$1.__require());
  function StyleToObject(style, iterator) {
    var styleObject = null;
    if (!style || typeof style !== "string") {
      return styleObject;
    }
    var declarations = (0, inline_style_parser_1.default)(style);
    var hasIterator = typeof iterator === "function";
    declarations.forEach(function(declaration) {
      if (declaration.type !== "declaration") {
        return;
      }
      var property = declaration.property, value = declaration.value;
      if (hasIterator) {
        iterator(property, value, declaration);
      } else if (value) {
        styleObject = styleObject || {};
        styleObject[property] = value;
      }
    });
    return styleObject;
  }
  return index.__exports;
}
exports.__require = requireCjs;
//# sourceMappingURL=cjs-index.cjs.map
