<?php

namespace App\Http\Resources\Email;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class EmailExtractorCompareResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'existed' => $this->resource['existed'] ?? [],
            'needToAdd' => $this->resource['needToAdd'] ?? [],
            'counts' => $this->resource['counts'] ?? [
                'csv' => 0,
                'db' => 0,
                'users' => 0,
                'parents' => 0,
            ],
        ];
    }
}
