<?php

namespace Remytek\Docbuilder\Repositories\Presenter;

use League\Fractal\TransformerAbstract;
use Hashids;

class DocbuilderTransformer extends TransformerAbstract
{
    public function transform(\Remytek\Docbuilder\Models\Docbuilder $docbuilder)
    {
        return [
            'id'                => $docbuilder->getRouteKey(),
            'key'               => [
                'public'    => $docbuilder->getPublicKey(),
                'route'     => $docbuilder->getRouteKey(),
            ], 
            'id'                => $docbuilder->id,
            'template_name'     => $docbuilder->template_name,
            'file_name'         => $docbuilder->file_name,
            'template_tags'     => $docbuilder->template_tags,
            'template_tags)'    => $docbuilder->template_tags),
            '11)'               => $docbuilder->11),
            'AUTO_INCREMENT=3;' => $docbuilder->AUTO_INCREMENT=3;,
            'url'               => [
                'public'    => trans_url('docbuilder/'.$docbuilder->getPublicKey()),
                'user'      => guard_url('docbuilder/docbuilder/'.$docbuilder->getRouteKey()),
            ], 
            'status'            => trans('app.'.$docbuilder->status),
            'created_at'        => format_date($docbuilder->created_at),
            'updated_at'        => format_date($docbuilder->updated_at),
        ];
    }
}