'use strict';

var camelToDash = require('../../dom/utils/camel-to-dash.js');
var render = require('../../html/utils/render.js');
var camelCaseAttrs = require('./camel-case-attrs.js');

function renderSVG(element, renderState, _styleProp, projection) {
    render.renderHTML(element, renderState, undefined, projection);
    for (const key in renderState.attrs) {
        element.setAttribute(!camelCaseAttrs.camelCaseAttributes.has(key) ? camelToDash.camelToDash(key) : key, renderState.attrs[key]);
    }
}

exports.renderSVG = renderSVG;
