<?php

namespace App\Filament\Resources\Monitoring\ContentRecaps\Pages;

use App\Filament\Exports\ContentRecapExcelExport;
use App\Filament\Resources\Monitoring\ContentRecaps\ContentRecapResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use pxlrbt\FilamentExcel\Actions\ExportAction;

class ListContentRecaps extends ListRecords
{
    protected static string $resource = ContentRecapResource::class;

    protected static ?string $title = 'Rekap Konten';

    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->label('Tambah'),

            ExportAction::make()
                ->exports([
                    ContentRecapExcelExport::make()
                        ->fromTable(),
                ])
                ->color('success')
                ->icon(null),
        ];
    }
}
