<?php

namespace App\Transformers\Localization;

use App\Models\Localization\Locale;
use League\Fractal\TransformerAbstract;

class LocaleTransformer extends TransformerAbstract {
    protected array $defaultIncludes = [
    ];

    protected array $availableIncludes = [
    ];

    public function transform(Locale $model): array {
        return [
            'id' => $model->uuid,
            'name' => $model->name,
            'name_iso' => $model->name_iso,
            'title' => $model->title,
            'rtl' => boolval($model->rtl),
            'is_active' => boolval($model->isActive),
            'is_enabled' => boolval($model->is_enabled),
            'is_default' => boolval($model->is_default)
        ];
    }


}
