"use strict";exports.__esModule = true;exports.getVisualStateDataAttributes = getVisualStateDataAttributes;var _toKebabCase = require("../../../lib/toKebabCase");




var prefix = "data-visual-state-";

function fillResult(result, key, value) {
  if (value) {
    result["" + prefix + (0, _toKebabCase.toKebabCase)(key)] = '';
  }

  return result;
}

function getVisualStateDataAttributes(
attributes)
{
  return Object.entries(attributes).reduce(
    function (previousValue, currentValue) {return fillResult(previousValue, currentValue[0], currentValue[1]);},
    {}
  );
}