<?php

namespace App\Http\Resources\Support;

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

class ContactMessageResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'email_sent' => (bool) ($this->resource['email_sent'] ?? false),
            'recipient' => $this->resource['recipient'] ?? null,
        ];
    }
}
