node->systemInformation(); $exception = $systemInformation['exception'] ?? null; $version = $systemInformation['version'] ?? null; if ($exception) { $this->js('console.error("' . $exception . '");'); } $tooltip = $exception ? 'Error connecting to node!
Check browser console for details.' : $version; $icon = 'tabler-heart' . ($exception ? '-off' : 'beat'); $color = $exception ? 'danger' : 'success'; return generate_icon_html($icon, attributes: (new ComponentAttributeBag()) ->merge([ 'x-tooltip' => '{ content: "' . $tooltip . '", theme: $store.theme, allowHTML: true, placement: "bottom", }', ], escape: false) ->color(IconComponent::class, $color), size: IconSize::Large) ->toHtml(); } public function placeholder(): string { return generate_icon_html('tabler-heart-question', attributes: (new ComponentAttributeBag()) ->color(IconComponent::class, 'warning'), size: IconSize::Large) ->toHtml(); } }