<?php

namespace Modules\Setting\Resources\Api;

use Illuminate\Http\Resources\Json\JsonResource;

class SettingResource extends JsonResource
{

    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'min_points' => (int) $this->min_points,
            'max_points' => (int) $this->max_points,
            'management_tax' => (double) $this->management_tax,
            'point_val' => (double) $this->point_val,
            'tax_value' => (double) $this->tax_value,
            'tax_valid' => (bool) $this->tax_valid,
            'phone' => $this->site_phone,
            'email' => $this->site_email,
            'facebook' => $this->facebook,
            'twitter' => $this->twitter,
            'instagram' => $this->instagram,
            'tiktok' => $this->snapchat,
            'linkedin' => $this->linkedin,
            'youtube' => $this->youtube,
            'android_version' => (double) $this->android_version,
            'android_store' => $this->android_store,
            'ios_version' => (double) $this->ios_version,
            'ios_store' => $this->ios_store,
        ];
    }

}
