> */ protected function getRecords(): array { return collect($this->records)->values()->all(); } public function table(Table $table): Table { return $table ->records(fn () => $this->getRecords()) ->columns([ TextColumn::make('type') ->label(__('Type')) ->badge() ->color('success'), TextColumn::make('name') ->label(__('Name')) ->fontFamily(FontFamily::Mono), TextColumn::make('content') ->label(__('Content')) ->fontFamily(FontFamily::Mono) ->limit(50) ->tooltip(fn (array $record): string => (string) ($record['content'] ?? '')), TextColumn::make('ttl') ->label(__('TTL')), TextColumn::make('priority') ->label(__('Priority')) ->placeholder('-'), ]) ->actions([ Action::make('removePending') ->label(__('Remove')) ->icon('heroicon-o-x-mark') ->color('danger') ->action(function (array $record): void { $key = $record['key'] ?? null; if (! $key) { return; } $this->dispatch('dns-pending-add-remove', key: $key); }), ]) ->striped() ->paginated(false) ->emptyStateHeading(__('No pending records')) ->emptyStateDescription(__('Queued records will appear here.')) ->emptyStateIcon('heroicon-o-plus-circle') ->poll(null); } public function render() { return $this->getTable()->render(); } }