records(fn () => array_reverse($this->threats)) ->columns([ TextColumn::make('threat') ->label(__('Threat')) ->icon('heroicon-o-exclamation-triangle') ->iconColor('danger') ->badge() ->color('danger') ->searchable(), TextColumn::make('file') ->label(__('File Path')) ->formatStateUsing(fn (?string $state): string => $state ? basename($state) : '-') ->tooltip(fn (array $record): string => $record['file'] ?? '') ->fontFamily('mono') ->limit(50), ]) ->striped() ->emptyStateHeading(__('No threats detected')) ->emptyStateDescription(__('No recent threats have been found.')) ->emptyStateIcon('heroicon-o-check-circle'); } public function render() { return $this->getTable()->render(); } }