<?php

namespace App\Domains\Tenant\Resources\AdminApp;

use App\Domains\Tenant\Models\WebsiteType;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @mixin WebsiteType
 */
class BootstrapAdminAppResource extends JsonResource
{
    /**
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'codigo' => $this->codigo,
            'website_type_code' => $this->codigo,
            'nombre' => $this->nombre,
            'dominio' => $this->dominio,
            'primary_color' => $this->primary_color,
            'secondary_color' => $this->secondary_color,
            'danger_color' => $this->danger_color,
            'success_color' => $this->success_color,
            'warning_color' => $this->warning_color,
            'body_color' => $this->body_color,
            'darker_body_color' => $this->darker_body_color,
            'surface_color' => $this->surface_color,
            'background_color' => $this->background_color,
            'border_color' => $this->border_color,
            'login_header_footer_color' => $this->login_header_footer_color,
            'site_logo' => $this->siteLogo?->getTemporaryUrl(1440),
        ];
    }
}
