<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class Misc extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */

    public function __construct($resource)
    {
        $this->resource = $resource;
    }

    public function toArray($request)
    {
        $out = [
            'topupButton' => getLinkPath($this->top_up_button),
            'loginButton' => getLinkPath($this->login_button),
            'cookiesLink' => getLinkPath($this->cookies_cta1),
            'cookiesText' => $this->cookies_message,
            'cookiesAcceptLabel' => $this->cookies_accept
        ];

        return $out;
    }
}
