<?php

namespace Database\Seeders;

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

class AgentSeeder extends Seeder
{
    public function run()
    {
        $agents = [
            [
                'name' => 'أحمد محمد علي',
                'phone' => '07901234567',
                'email' => 'ahmed@example.com',
                'governorate' => 'بغداد',
                'city' => 'الكرادة',
                'address' => 'شارع الكرادة، بناية 123',
                'type' => 'premium',
                'rating' => 4.8,
                'total_transactions' => 750,
                'is_active' => true,
                'description' => 'وكيل معتمد مع أكثر من 5 سنوات خبرة في بيع الجواهر الرقمية',
                'working_hours' => [
                    'sunday' => ['09:00', '22:00'],
                    'monday' => ['09:00', '22:00'],
                    'tuesday' => ['09:00', '22:00'],
                    'wednesday' => ['09:00', '22:00'],
                    'thursday' => ['09:00', '22:00'],
                    'friday' => ['14:00', '22:00'],
                    'saturday' => ['09:00', '22:00'],
                ],
                'payment_methods' => ['cash', 'bank_transfer', 'mobile_payment'],
            ],
            [
                'name' => 'فاطمة حسن',
                'phone' => '07912345678',
                'email' => 'fatima@example.com',
                'governorate' => 'البصرة',
                'city' => 'الزبير',
                'address' => 'شارع الزبير، مجمع 456',
                'type' => 'premium',
                'rating' => 4.9,
                'total_transactions' => 1200,
                'is_active' => true,
                'description' => 'وكيلة مميزة مع تقييمات ممتازة من العملاء',
                'working_hours' => [
                    'sunday' => ['08:00', '20:00'],
                    'monday' => ['08:00', '20:00'],
                    'tuesday' => ['08:00', '20:00'],
                    'wednesday' => ['08:00', '20:00'],
                    'thursday' => ['08:00', '20:00'],
                    'friday' => ['14:00', '20:00'],
                    'saturday' => ['08:00', '20:00'],
                ],
                'payment_methods' => ['cash', 'bank_transfer'],
            ],
            [
                'name' => 'علي كريم',
                'phone' => '07923456789',
                'email' => 'ali@example.com',
                'governorate' => 'الموصل',
                'city' => 'الموصل',
                'address' => 'شارع الجامعة، بناية 789',
                'type' => 'new',
                'rating' => 4.5,
                'total_transactions' => 150,
                'is_active' => true,
                'description' => 'وكيل جديد لكن موثوق ومتاح 24/7',
                'working_hours' => [
                    'sunday' => ['00:00', '23:59'],
                    'monday' => ['00:00', '23:59'],
                    'tuesday' => ['00:00', '23:59'],
                    'wednesday' => ['00:00', '23:59'],
                    'thursday' => ['00:00', '23:59'],
                    'friday' => ['00:00', '23:59'],
                    'saturday' => ['00:00', '23:59'],
                ],
                'payment_methods' => ['cash', 'mobile_payment'],
            ],
            [
                'name' => 'زينب أحمد',
                'phone' => '07934567890',
                'email' => 'zainab@example.com',
                'governorate' => 'أربيل',
                'city' => 'أربيل',
                'address' => 'شارع 60 متر، مجمع 321',
                'type' => 'premium',
                'rating' => 4.7,
                'total_transactions' => 900,
                'is_active' => true,
                'description' => 'وكيلة محترفة مع أسعار تنافسية',
                'working_hours' => [
                    'sunday' => ['10:00', '18:00'],
                    'monday' => ['10:00', '18:00'],
                    'tuesday' => ['10:00', '18:00'],
                    'wednesday' => ['10:00', '18:00'],
                    'thursday' => ['10:00', '18:00'],
                    'friday' => ['14:00', '18:00'],
                    'saturday' => ['10:00', '18:00'],
                ],
                'payment_methods' => ['cash', 'bank_transfer', 'mobile_payment'],
            ],
            [
                'name' => 'محمد عبدالله',
                'phone' => '07945678901',
                'email' => 'mohammed@example.com',
                'governorate' => 'النجف',
                'city' => 'النجف',
                'address' => 'شارع الإمام علي، بناية 654',
                'type' => 'new',
                'rating' => 4.3,
                'total_transactions' => 80,
                'is_active' => true,
                'description' => 'وكيل جديد لكن سريع في التوصيل',
                'working_hours' => [
                    'sunday' => ['09:00', '21:00'],
                    'monday' => ['09:00', '21:00'],
                    'tuesday' => ['09:00', '21:00'],
                    'wednesday' => ['09:00', '21:00'],
                    'thursday' => ['09:00', '21:00'],
                    'friday' => ['14:00', '21:00'],
                    'saturday' => ['09:00', '21:00'],
                ],
                'payment_methods' => ['cash', 'mobile_payment'],
            ],
            [
                'name' => 'نورا سعد',
                'phone' => '07956789012',
                'email' => 'nora@example.com',
                'governorate' => 'كربلاء',
                'city' => 'كربلاء',
                'address' => 'شارع الحسين، مجمع 987',
                'type' => 'premium',
                'rating' => 4.9,
                'total_transactions' => 1100,
                'is_active' => true,
                'description' => 'وكيلة مميزة مع خدمة عملاء ممتازة',
                'working_hours' => [
                    'sunday' => ['08:00', '22:00'],
                    'monday' => ['08:00', '22:00'],
                    'tuesday' => ['08:00', '22:00'],
                    'wednesday' => ['08:00', '22:00'],
                    'thursday' => ['08:00', '22:00'],
                    'friday' => ['14:00', '22:00'],
                    'saturday' => ['08:00', '22:00'],
                ],
                'payment_methods' => ['cash', 'bank_transfer', 'mobile_payment'],
            ],
        ];

        foreach ($agents as $agentData) {
            Agent::create($agentData);
        }
    }
}
