<?php

namespace Litematrimony\Profile\Repositories\Presenter;

use League\Fractal\TransformerAbstract;
use Hashids;

class ProfileTransformer extends TransformerAbstract
{
    public function transform(\Litematrimony\Profile\Models\Profile $profile)
    {
        return [
            'id'                => $profile->getRouteKey(),
            'key'               => [
                'public'    => $profile->getPublicKey(),
                'route'     => $profile->getRouteKey(),
            ], 
            'id'                => $profile->id,
            'reporting_to'      => $profile->reporting_to,
            'name'              => $profile->name,
            'email'             => $profile->email,
            'password'          => $profile->password,
            'api_token'         => $profile->api_token,
            'remember_token'    => $profile->remember_token,
            'gender'            => $profile->gender,
            'dob'               => $profile->dob,
            'designation'       => $profile->designation,
            'mobile'            => $profile->mobile,
            'phone'             => $profile->phone,
            'address'           => $profile->address,
            'street'            => $profile->street,
            'city'              => $profile->city,
            'district'          => $profile->district,
            'state'             => $profile->state,
            'country'           => $profile->country,
            'photo'             => $profile->photo,
            'ref'               => $profile->ref,
            'profile_for'       => $profile->profile_for,
            'candidate_name'    => $profile->candidate_name,
            'marital_status'    => $profile->marital_status,
            'age'               => $profile->age,
            'nationality'       => $profile->nationality,
            'country_id'        => $profile->country_id,
            'state_id'          => $profile->state_id,
            'city_id'           => $profile->city_id,
            'mothertongue'      => $profile->mothertongue,
            'languages_known'   => $profile->languages_known,
            'religion'          => $profile->religion,
            'caste'             => $profile->caste,
            'subcaste'          => $profile->subcaste,
            'religious_value'   => $profile->religious_value,
            'height'            => $profile->height,
            'weight'            => $profile->weight,
            'body_type'         => $profile->body_type,
            'complexion'        => $profile->complexion,
            'physical_status'   => $profile->physical_status,
            'education'         => $profile->education,
            'employment_type'   => $profile->employment_type,
            'occupation'        => $profile->occupation,
            'income'            => $profile->income,
            'star'              => $profile->star,
            'raasi'             => $profile->raasi,
            'dosham'            => $profile->dosham,
            'food_habits'       => $profile->food_habits,
            'smoking'           => $profile->smoking,
            'drinking'          => $profile->drinking,
            'family_status'     => $profile->family_status,
            'family_type'       => $profile->family_type,
            'family_values'     => $profile->family_values,
            'images'            => $profile->images,
            'horoscope'         => $profile->horoscope,
            'description'       => $profile->description,
            'profile_status'    => $profile->profile_status,
            'email_alert'       => $profile->email_alert,
            'phone_setting'     => $profile->phone_setting,
            'horoscope_setting' => $profile->horoscope_setting,
            'photo_setting'     => $profile->photo_setting,
            'viwed_profiles'    => $profile->viwed_profiles,
            'profile_visitors'  => $profile->profile_visitors,
            'subscription'      => $profile->subscription,
            'activated_at'      => $profile->activated_at,
            'expires_at'        => $profile->expires_at,
            'published'         => $profile->published,
            'plan'              => $profile->plan,
            'web'               => $profile->web,
            'permissions'       => $profile->permissions,
            'status'            => $profile->status,
            'user_id'           => $profile->user_id,
            'user_type'         => $profile->user_type,
            'upload_folder'     => $profile->upload_folder,
            'deleted_at'        => $profile->deleted_at,
            'created_at'        => $profile->created_at,
            'updated_at'        => $profile->updated_at,
            'url'               => [
                'public'    => trans_url('profile/'.$profile->getPublicKey()),
                'user'      => guard_url('profile/profile/'.$profile->getRouteKey()),
            ], 
            'status'            => trans('app.'.$profile->status),
            'created_at'        => format_date($profile->created_at),
            'updated_at'        => format_date($profile->updated_at),
        ];
    }
}