<?php

namespace Database\Seeders;

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

class PortalSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $portals = [
            [
                'key' => 'lms',
                'name' => 'Learning Management System',
                'description' => 'Manage courses, lessons, and student progress',
                'url' => 'http://localhost:5174',
                'icon' => 'BookOpen',
                'enabled' => true,
            ],
            [
                'key' => 'cms',
                'name' => 'Client Management System',
                'description' => 'Manage clients, contacts, and relationships',
                'url' => 'http://localhost:5175',
                'icon' => 'UserCircle',
                'enabled' => true,
            ],
            [
                'key' => 'content',
                'name' => 'Content Management System',
                'description' => 'Manage website content, pages, and media',
                'url' => 'http://localhost:5177',
                'icon' => 'FileText',
                'enabled' => true,
            ],
            [
                'key' => 'immigopro',
                'name' => 'ImmiGoPro Client Management',
                'description' => 'Immigration client management and case tracking',
                'url' => 'http://localhost:5178',
                'icon' => 'Building2',
                'enabled' => true,
            ],
            [
                'key' => 'public_client',
                'name' => 'Public Client Management',
                'description' => 'Public-facing client portal and management',
                'url' => 'http://localhost:5179',
                'icon' => 'Globe',
                'enabled' => true,
            ],
            [
                'key' => 'payments',
                'name' => 'Payment Management',
                'description' => 'Manage invoices, transactions, and subscriptions',
                'url' => 'http://localhost:5176',
                'icon' => 'DollarSign',
                'enabled' => true,
            ],
            [
                'key' => 'user_portal',
                'name' => 'User Portal',
                'description' => 'User dashboard and personal account management',
                'url' => 'http://localhost:5180',
                'icon' => 'User',
                'enabled' => true,
            ],
        ];

        foreach ($portals as $portal) {
            Portal::create($portal);
        }

        $this->command->info('✓ Portals seeded successfully!');
    }
}
