protected function getStackIconElement($key, $value, $index)
    {
        $element = $value;

        if (is_string($key))
        {
            $element = $this->icon($key)->addClass($value);
        }
        else if (is_string($value))
        {
            $element = $this->icon($value);
        }

        if ( !is_a($element, FontAwesomeIcon::class))
        {
            throw new \InvalidArgumentException('Invalid icon passed to stack');
        }

        return $element->addClass("fa-stack-{$index}x");
    }