<?php

namespace Database\Seeders;

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

class PageSectionSeeder extends Seeder
{
    public function run(): void
    {
        $sections = [
            ['name' => 'About The Conference', 'slug' => 'about', 'order' => 1],
            ['name' => 'Keynote & Plenary Speakers', 'slug' => 'speakers', 'order' => 2],
            ['name' => 'Call For Papers', 'slug' => 'call-for-papers', 'order' => 3],
            ['name' => 'Registration & Fees', 'slug' => 'registration', 'order' => 4],
            ['name' => 'Venue & Travel', 'slug' => 'venue', 'order' => 5],
            ['name' => 'Resources & Contact', 'slug' => 'resources', 'order' => 6],
        ];

        foreach ($sections as $section) {
            PageSection::updateOrCreate(
                ['slug' => $section['slug']],
                array_merge($section, ['is_active' => true])
            );
        }
    }
}
