<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class CategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $categories = [
            [
                'id' => 1,
                'title' => 'General Knowledge',
                'icon' => '/assets/client/category/quiz-icon-1.png',
            ],
            [
                'id' => 2,
                'title' => 'Science',
                'icon' => '/assets/client/category/quiz-icon-2.png',
            ],
            [
                'id' => 3,
                'title' => 'History',
                'icon' => '/assets/client/category/quiz-icon-3.png',
            ],
            [
                'id' => 4,
                'title' => 'Geography',
                'icon' => '/assets/client/category/quiz-icon-4.png',
            ],
            [
                'id' => 5,
                'title' => 'Mathematics',
                'icon' => '/assets/client/category/quiz-icon-5.png',
            ],
            [
                'id' => 6,
                'title' => 'Literature',
                'icon' => '/assets/client/category/quiz-icon-6.png',
            ],
            [
                'id' => 7,
                'title' => 'Sports',
                'icon' => '/assets/client/category/quiz-icon-7.png',
            ],
            [
                'id' => 8,
                'title' => 'Movies',
                'icon' => '/assets/client/category/quiz-icon-8.png',
            ],
            [
                'id' => 9,
                'title' => 'Music',
                'icon' => '/assets/client/category/quiz-icon-9.png',
            ],
            [
                'id' => 10,
                'title' => 'Technology',
                'icon' => '/assets/client/category/quiz-icon-10.png',
            ],
            [
                'id' => 11,
                'title' => 'Programming',
                'icon' => '/assets/client/category/quiz-icon-9.png',
            ],
            [
                'id' => 12,
                'title' => 'Hardware',
                'icon' => '/assets/client/category/quiz-icon-10.png',
            ],
        ];

        foreach ($categories as $category) {
            \App\Models\QuizCategory::create($category);
            \App\Models\ContestCategory::create([
                'title' => $category['title'],
                'slug' => \Str::slug($category['title']),
                'image' => $category['icon'],
            ]);
        }
    }
}
