<?php

declare(strict_types=1);

namespace App\Filament\Pages\Concerns;

use Filament\Actions\Action;
use Filament\Support\Enums\Alignment;

trait HasDberpAnalysisPageCsvExport
{
    public function getHeaderActionsAlignment(): ?Alignment
    {
        return Alignment::End;
    }

    /**
     * @return non-empty-string
     */
    abstract protected function reportExportKey(): string;

    /**
     * @return array<Action>
     */
    protected function getHeaderActions(): array
    {
        return [
            $this->makeReportPageExportCsvAction($this->reportExportKey()),
        ];
    }
}
