pageSlug = $pageSlug; $this->currentTab = $currentTab; /** @var Tab[] */ $this->tabs = $tabs; } public function __invoke(): void { ?> $this->pageSlug, 'tab' => $tab->getSlug()], $url); } protected function tabClass(Tab $tab): string { return implode(' ', [ 'pb-2 border-b-3 px-3.5', 'whitespace-nowrap text-sm font-medium', $this->currentTab->getSlug() === $tab->getSlug() ? 'border-primary text-primary' : 'text-littleMuted border-transparent hover:border-gray-300 hover:text-gray-700' ]); } protected function tabIcon(Tab $tab): ?string { if ($icon = $tab->getIcon()) { return $icon->class('mr-1 inline-block h-4 w-4'); } return null; } }