createTextNode = ({
  icon,
  label,
  value,
  id,
  unitSymbol,
  index,
  showIcons,
  shiftValuePos,
  bold,
  number_format,
}) => {
  const kValue =
    number_format.toLowerCase() === "long" ? value : kFormatter(value);
  const staggerDelay = (index + 3) * 150;

  const labelOffset = showIcons ? `x="25"` : "";
  const iconSvg = showIcons
    ? `
    <svg data-testid="icon" class="icon" viewBox="0 0 16 16" version="1.1" width="16" height="16">
      ${icon}
    </svg>
  `
    : "";
  return `
    <g class="stagger" style="animation-delay: ${staggerDelay}ms" transform="translate(25, 0)">
      ${iconSvg}
      <text class="stat ${
        bold ? " bold" : "not_bold"
      }" ${labelOffset} y="12.5">${label}:</text>
      <text
        class="stat ${bold ? " bold" : "not_bold"}"
        x="${(showIcons ? 140 : 120) + shiftValuePos}"
        y="12.5"
        data-testid="${id}"
      >${kValue}${unitSymbol ? ` ${unitSymbol}` : ""}</text>
    </g>
  `;
}
Create a stats card text item.

@param {object} createTextNodeParams Object that contains the createTextNode parameters.
@param {string} createTextNodeParams.icon The icon to display.
@param {string} createTextNodeParams.label The label to display.
@param {number} createTextNodeParams.value The value to display.
@param {string} createTextNodeParams.id The id of the stat.
@param {string=} createTextNodeParams.unitSymbol The unit symbol of the stat.
@param {number} createTextNodeParams.index The index of the stat.
@param {boolean} createTextNodeParams.showIcons Whether to show icons.
@param {number} createTextNodeParams.shiftValuePos Number of pixels the value has to be shifted to the right.
@param {boolean} createTextNodeParams.bold Whether to bold the label.
@param {string} createTextNodeParams.number_format The format of numbers on card.
@returns {string} The stats card text item SVG object.