<?php

namespace App\Mail\Concerns;

use App\Models\Central\Company;

trait UsesTenantBranding
{
    public Company $company;

    public function buildBrandingContext(): array
    {
        return [
            'companyName' => $this->company->display_name ?? $this->company->name,
            'themeColor' => $this->company->settings['theme_color'] ?? '#3B82F6',
            'phone' => $this->company->phone,
            'email' => $this->company->email,
            'city' => $this->company->city,
            'logoUrl' => $this->company->getLogoUrl(),
            'tenantUrl' => $this->company->url('/app'),
        ];
    }
}
