<?php

declare(strict_types=1);

namespace App\Filament\Exports;

use App\Models\Newsletter;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;

class NewsletterExporter extends Exporter
{
    protected static ?string $model = Newsletter::class;

    public static function getCompletedNotificationBody(Export $export): string
    {
        return __('filament-actions::export.notifications.completed.body', [
            'count' => $export->getProcessedRowsCount(),
        ]);
    }

    public static function getColumns(): array
    {
        return [
            ExportColumn::make('id')->label('شناسه'),
            ExportColumn::make('email')->label('ایمیل'),
            ExportColumn::make('cellphone')->label('شماره همراه'),
            ExportColumn::make('created_at')->label('تاریخ ثبت'),
        ];
    }
}
