<?php

namespace App\Http\Resources;

use App\Helpers\ImageHelper;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @property mixed about_title
 * @property mixed about_description
 */
class AboutsResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'about_image_1' => ImageHelper::getFullPath($this->about_image_1),
            'about_image_2' => ImageHelper::getFullPath($this->about_image_2),
            'video_image' => ImageHelper::getFullPath($this->video_image),
            'video_url' => $this->video_url,
            'client_numbers' => $this->client_numbers,
            'consulting_numbers' => $this->consulting_numbers,
            'cases_numbers' => $this->cases_numbers,
            'documentation_numbers' => $this->documentation_numbers,
            'about_title' => $this->about_title,
            'vision_title' => $this->vision_title,
            'mission_title' => $this->mission_title,
            'message_title' => $this->message_title,
            'video_title' => $this->video_title,
            'client_title' => $this->client_title,
            'cases_title' => $this->cases_title,
            'consulting_title' => $this->consulting_title,
            'documentation_title' => $this->documentation_title,
            'achieve_title' => $this->achieve_title,
            'video_description' => stripText(html_entity_decode($this->video_description)),
            'vision_description' => stripText(html_entity_decode($this->vision_description)),
            'mission_description' => stripText(html_entity_decode($this->mission_description)),
            'message_description' => stripText(html_entity_decode($this->message_description)),
            'about_description' => stripText(html_entity_decode($this->about_description)),
            'achieve_description' => stripText(html_entity_decode($this->achieve_description)),
        ];
    }
}
