<?php

namespace App\Http\Resources;

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

class DashboardPrestadorResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'headerBar'      => data_get($this, 'headerBar'),
            'summaryInfos'   => data_get($this, 'summaryInfos'),
            'priceSuggested' => data_get($this, 'priceSuggested'),
            'todayServices'  => data_get($this, 'todayServices'),
            'solicitations'  => data_get($this, 'solicitations'),
            'nextSchedules'  => data_get($this, 'nextSchedules'),
            'opportunities'  => data_get($this, 'opportunities'),
            'notifications'  => data_get($this, 'notifications'),
            'pendingConfirmation' => data_get($this, 'pendingConfirmation'),
        ];
    }
}
