<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class GiftPrizesSeeder extends Seeder
{
    public function run(): void
    {
        $prizes = [
            ['name_ar' => 'هاتف آيفون', 'emoji' => '📱', 'sort_order' => 1],
            ['name_ar' => 'ثلاجة', 'emoji' => '🧊', 'sort_order' => 2],
            ['name_ar' => 'مجمدة', 'emoji' => '❄️', 'sort_order' => 3],
            ['name_ar' => 'تلفزيون', 'emoji' => '📺', 'sort_order' => 4],
            ['name_ar' => 'سيارة', 'emoji' => '🚗', 'sort_order' => 5],
            ['name_ar' => 'مبلغ مالي', 'emoji' => '💰', 'sort_order' => 6],
            ['name_ar' => 'مكواة', 'emoji' => '♨️', 'sort_order' => 7],
            ['name_ar' => 'جهاز كهربائي', 'emoji' => '🔌', 'sort_order' => 8],
            ['name_ar' => 'ساعة', 'emoji' => '⌚', 'sort_order' => 9],
        ];

        foreach ($prizes as $prize) {
            DB::table('gift_prizes')->updateOrInsert(
                ['name_ar' => $prize['name_ar']],
                array_merge($prize, ['is_active' => true, 'created_at' => now(), 'updated_at' => now()])
            );
        }
    }
}
