disabled(fn (): bool => ! TenantResource::canCreate()) ->tooltip(fn (): ?string => TenantResource::canCreate() ? null : 'You do not have permission to register tenants.') ->visible(fn (): bool => $this->getTableRecords()->count() > 0), ]; } protected function getTableEmptyStateActions(): array { return [ Actions\CreateAction::make() ->disabled(fn (): bool => ! TenantResource::canCreate()) ->tooltip(fn (): ?string => TenantResource::canCreate() ? null : 'You do not have permission to register tenants.'), ]; } }