makeHeaderCreateAction()]; } protected function getTableEmptyStateActions(): array { return [$this->makeEmptyStateCreateAction()]; } private function tableHasRecords(): bool { return $this->getTableRecords()->count() > 0; } private function makeHeaderCreateAction(): Actions\CreateAction { return $this->makeCreateAction() ->visible(fn (): bool => $this->tableHasRecords()); } private function makeEmptyStateCreateAction(): Actions\CreateAction { return $this->makeCreateAction(); } private function makeCreateAction(): Actions\CreateAction { return Actions\CreateAction::make() ->label('New backup schedule') ->disabled(fn (): bool => ! BackupScheduleResource::canCreate()) ->tooltip(fn (): ?string => BackupScheduleResource::canCreate() ? null : 'You do not have permission to create backup schedules.'); } }