<?php

namespace App\Filament\Resources\Banners\Pages;

use App\Filament\Resources\Banners\BannerResource;
use Filament\Actions\EditAction;
use Filament\Actions\Action; // <--- 1. Import Action manual
use Filament\Resources\Pages\ViewRecord;

class ViewBanner extends ViewRecord
{
    protected static string $resource = BannerResource::class;

    protected function getHeaderActions(): array
    {
        return [
            EditAction::make(),

            // 2. Tambahkan Tombol Kembali di sini
            Action::make('back')
                ->label('Kembali')
                ->url($this->getResource()::getUrl('index')) // Arahkan ke halaman List
                ->color('gray') // Warna abu-abu biar beda sama tombol Edit
                ->icon('heroicon-m-arrow-left'), // Opsional: Tambah ikon panah kiri
        ];
    }
}