<?php

namespace Database\Seeders;

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

class PageSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $pages = [
            [
                'slug' => 'index',
                'name' => 'Home',
                'title_en' => 'Home',
                'title_ar' => 'الرئيسية',
                'description_en' => 'Welcome to our homepage.',
                'description_ar' => 'مرحبًا بكم في صفحتنا الرئيسية.',
                'banner' => 'banners/home.jpg',
                'meta_tags' => ['home', 'index', 'main'],
            ],
            [
                'slug' => 'about',
                'name' => 'About Us',
                'title_en' => 'About Us',
                'title_ar' => 'من نحن',
                'description_en' => 'Learn more about us.',
                'description_ar' => 'تعرف علينا أكثر.',
                'banner' => 'banners/about.jpg',
                'meta_tags' => ['about', 'info', 'company'],
            ],
            [
                'slug' => 'fasilities',
                'name' => 'Facilities',
                'title_en' => 'Our Facilities',
                'title_ar' => 'مرافقنا',
                'description_en' => 'Explore our world-class facilities.',
                'description_ar' => 'استكشف مرافقنا ذات المستوى العالمي.',
                'banner' => 'banners/facilities.jpg',
                'meta_tags' => ['facilities', 'services', 'features'],
            ],
            [
                'slug' => 'careers',
                'name' => 'Careers',
                'title_en' => 'Join Our Team',
                'title_ar' => 'انضم إلى فريقنا',
                'description_en' => 'Discover career opportunities with us.',
                'description_ar' => 'اكتشف فرص العمل معنا.',
                'banner' => 'banners/careers.jpg',
                'meta_tags' => ['careers', 'jobs', 'work'],
            ],
            [
                'slug' => 'news',
                'name' => 'News',
                'title_en' => 'Latest News',
                'title_ar' => 'الأخبار',
                'description_en' => 'Stay updated with the latest news.',
                'description_ar' => 'ابق على اطلاع بآخر الأخبار.',
                'banner' => 'banners/news.jpg',
                'meta_tags' => ['news', 'updates', 'media'],
            ],
            [
                'slug' => 'events',
                'name' => 'Events',
                'title_en' => 'Upcoming Events',
                'title_ar' => 'الفعاليات',
                'description_en' => 'Check out our upcoming events.',
                'description_ar' => 'اطلع على فعالياتنا القادمة.',
                'banner' => 'banners/events.jpg',
                'meta_tags' => ['events', 'activities', 'schedule'],
            ],
            [
                'slug' => 'contact-us',
                'name' => 'Contact Us',
                'title_en' => 'Get in Touch',
                'title_ar' => 'اتصل بنا',
                'description_en' => 'We would love to hear from you.',
                'description_ar' => 'يسعدنا سماع أخبارك.',
                'banner' => 'banners/contact.jpg',
                'meta_tags' => ['contact', 'support', 'help'],
            ],
        ];

        foreach ($pages as $page) {
            Page::updateOrCreate(['slug' => $page['slug']], $page);
        }
    }
}
