<?php

namespace App\Filament\Pages;

use BackedEnum;
use Filament\Actions\Action;
use Filament\Pages\Page;
use Filament\Support\Enums\Width;
use Filament\Support\Icons\Heroicon;

class ApplicantExports extends Page
{
    protected static string|BackedEnum|null $navigationIcon = Heroicon::DocumentCheck;

    protected static ?string $navigationLabel = 'Applicant Exports';

    protected static string|\UnitEnum|null $navigationGroup = 'Operations';

    protected static ?int $navigationSort = 30;

    protected string $view = 'filament.pages.applicant-exports';

    protected Width|string|null $maxContentWidth = Width::Full;

    /**
     * @return array<int, Action>
     */
    protected function getHeaderActions(): array
    {
        return [
            Action::make('downloadApplicants')
                ->label('Export applicants CSV')
                ->icon(Heroicon::DocumentCheck)
                ->url(route('admin.exports.applicants'))
                ->openUrlInNewTab(),

            Action::make('downloadApplications')
                ->label('Export applications CSV')
                ->icon(Heroicon::CursorArrowRays)
                ->color('gray')
                ->url(route('admin.exports.applications'))
                ->openUrlInNewTab(),
        ];
    }
}
