<?php

namespace Database\Seeders;

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

class UsefulInfoSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $usefule1 = UsefulInfo::create([
            'name' => [
                'uz' => 'Foydali ma\'lumot 1',
                'ru' => 'Полезная информация 1',
            ],
            'image' => 'useful-info-1.jpg',
        ]);
        $usefule1->items()->createMany([
            [
                'name' => [
                    'uz' => 'Element 1',
                    'ru' => 'Элемент 1',
                ],
                'description' => [
                    'uz' => 'Element 1ning tavsifi',
                    'ru' => 'Описание элемента 1',
                ],
                'video_url' => 'https://www.youtube.com/watch?v=video1',
            ],
            [
                'name' => [
                    'uz' => 'Element 2',
                    'ru' => 'Элемент 2',
                ],
                'link_url' => 'https://www.google.com',
            ],
            [
                'name' => [
                    'uz' => 'Element 3',
                    'ru' => 'Элемент 3',
                ],
                'file_url' => 'file1.pdf',
            ],
        ]);

        $usefule2 = UsefulInfo::create([
            'name' => [
                'uz' => 'Foydali ma\'lumot 2',
                'ru' => 'Полезная информация 2',
            ],
            'image' => 'useful-info-2.jpg',
        ]);
        $usefule2->items()->createMany([
            [
                'name' => [
                    'uz' => 'Element 1',
                    'ru' => 'Элемент 1',
                ],
                'description' => [
                    'uz' => 'Element 1ning tavsifi',
                    'ru' => 'Описание элемента 1',
                ],
                'video_url' => 'https://www.youtube.com/watch?v=video1',
            ],
            [
                'name' => [
                    'uz' => 'Element 2',
                    'ru' => 'Элемент 2',
                ],
                'link_url' => 'https://www.google.com',
            ],
            [
                'name' => [
                    'uz' => 'Element 3',
                    'ru' => 'Элемент 3',
                ],
                'file_url' => 'file1.pdf',
            ],
        ]);

        $usefule3 = UsefulInfo::create([
            'name' => [
                'uz' => 'Foydali ma\'lumot 3',
                'ru' => 'Полезная информация 3',
            ],
            'image' => 'useful-info-3.jpg',
        ]);
        $usefule3->items()->createMany([
            [
                'name' => [
                    'uz' => 'Element 1',
                    'ru' => 'Элемент 1',
                ],
                'description' => [
                    'uz' => 'Element 1ning tavsifi',
                    'ru' => 'Описание элемента 1',
                ],
                'video_url' => 'https://www.youtube.com/watch?v=video1',
            ],
            [
                'name' => [
                    'uz' => 'Element 2',
                    'ru' => 'Элемент 2',
                ],
                'description' => [
                    'uz' => 'Element 2ning tavsifi',
                    'ru' => 'Описание элемента 2',
                ],
            ],
            [
                'name' => [
                    'uz' => 'Element 3',
                    'ru' => 'Элемент 3',
                ],
                'file_url' => 'file1.pdf',
            ],
        ]);
    }
}
