<?php

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

use App\Filament\Exports\IssueManagementExcelExport;
use App\Filament\Resources\Monitoring\IssueManagements\IssueManagementResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use pxlrbt\FilamentExcel\Actions\ExportAction;

class ListIssueManagements extends ListRecords
{
    protected static string $resource = IssueManagementResource::class;

    protected static ?string $title = 'Manajemen Isu';

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

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