<?php

namespace Database\Seeders;

use App\Models\Company;
use Illuminate\Database\Seeder;

class CompanySeeder extends Seeder
{
    public function run(): void
    {
        $empresas = [
            [
                'name'          => 'Fycls',
                'slug'          => 'fycls',
                'legal_name'    => 'Fycls S.A.S.',
                'domain'        => 'fycls.com',
                'primary_color' => '#1d4ed8',
                'is_operator'   => true,    // ← OPERADOR del Service Desk
                'is_active'     => true,
                'order'         => 0,
                'contact_email' => 'soporte@fycls.com',
            ],
            [
                'name'          => 'Fedef',
                'slug'          => 'fedef',
                'legal_name'    => 'Fedef',
                'domain'        => 'fedef-co.com',
                'primary_color' => '#16a34a',  // verde como su logo actual
                'is_operator'   => false,
                'is_active'     => true,
                'order'         => 1,
            ],
            [
                'name'          => 'Gessig',
                'slug'          => 'gessig',
                'legal_name'    => 'Gessig',
                'domain'        => 'gessig.com',
                'primary_color' => '#0891b2',  // teal
                'is_operator'   => false,
                'is_active'     => true,
                'order'         => 2,
            ],
            [
                'name'          => 'Trexdi',
                'slug'          => 'trexdi',
                'legal_name'    => 'Trexdi',
                'domain'        => 'trexdi.com',
                'primary_color' => '#dc2626',  // rojo
                'is_operator'   => false,
                'is_active'     => true,
                'order'         => 3,
            ],
        ];

        foreach ($empresas as $data) {
            Company::updateOrCreate(['slug' => $data['slug']], $data);
        }
    }
}
