label(fn (): string => app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_POLICY_VERSION, $this->getRecord())?->actionLabel ?? 'Open related record') ->url(fn (): ?string => app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_POLICY_VERSION, $this->getRecord())?->targetUrl) ->hidden(fn (): bool => ! (app(RelatedNavigationResolver::class) ->primaryListAction(CrossResourceNavigationMatrix::SOURCE_POLICY_VERSION, $this->getRecord())?->isAvailable() ?? false)) ->color('gray'), ]; } public function getFooter(): ?View { return view('filament.resources.policy-version-resource.pages.view-policy-version-footer', [ 'record' => $this->getRecord(), ]); } }