columns([ TextColumn::make('country_code') ->label(__('Country')) ->formatStateUsing(fn ($state) => strtoupper($state)) ->searchable(), TextColumn::make('action') ->label(__('Action')) ->badge() ->color(fn (string $state): string => $state === 'block' ? 'danger' : 'success'), TextColumn::make('notes') ->label(__('Notes')) ->wrap(), IconColumn::make('is_active') ->label(__('Active')) ->boolean(), ]) ->recordActions([ EditAction::make(), DeleteAction::make() ->after(function () { try { app(GeoBlockService::class)->applyCurrentRules(); } catch (\Exception $e) { Notification::make() ->title(__('Geo rules sync failed')) ->body($e->getMessage()) ->danger() ->send(); } }), ]) ->emptyStateHeading(__('No geo rules')) ->emptyStateDescription(__('Add a country rule to allow or block traffic.')); } }