createIcon = (prefix, icon) => {
  const [w, h, content, svg, data, , attrs] = icon
  let path

  const createPath = (d, attrs = {}) => `<path d="${d}" ${attrs.className ? `class="${attrs.className}"` : ''} fill="currentColor" />`

  const createGroupedPath = (groups, prefix) => {
    const paths = groups.map((d, idx) =>
      createPath(d, {
        className: idx ? `${prefix}-primary` : `${prefix}-secondary`
      })
    )

    return `<g fill="currentColor" class="${prefix}-group">${paths.join('')}</g>`
  }

  if (prefix.startsWith('fa')) {
    path = Array.isArray(data)
      ? createGroupedPath(data, prefix.substr(0, 2))
      : createPath(data)
  } else {
    path = prefix.startsWith('fe') ? content : svg
  }

  return {
    path,
    viewBox: `0 0 ${w} ${h}`,
    attrs
  }
}
@param {String} prefix - prefix for the icon pack
@param {Array} icon - icon definition
@returns {{path: string, viewBox: string, attrs: *}}