<?php

namespace Database\Seeders;

use App\Models\Setting;
use App\Models\SubTheme;
use Illuminate\Database\Seeder;

class SettingsSeeder extends Seeder
{
    public function run(): void
    {
        $settings = [
            // General
            ['key' => 'site_name', 'value' => 'TEFLIN 2026', 'type' => 'text', 'group' => 'general'],
            ['key' => 'site_tagline', 'value' => '72nd TEFLIN International Conference', 'type' => 'text', 'group' => 'general'],
            
            // Conference
            ['key' => 'conference_title', 'value' => '72nd TEFLIN International Conference', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'conference_theme', 'value' => 'Transforming Language Education: Innovation, Inclusion, and Connection for a Sustainable Future', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'conference_date', 'value' => '2026-10-07', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'conference_end_date', 'value' => '2026-10-09', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'conference_location', 'value' => 'Jakarta, Indonesia', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'conference_venue', 'value' => 'UIN Syarif Hidayatullah Jakarta', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'registration_open', 'value' => 'true', 'type' => 'text', 'group' => 'conference'],
            ['key' => 'abstract_deadline', 'value' => '2026-05-31', 'type' => 'text', 'group' => 'conference'],
            
            // Hero
            ['key' => 'hero_badge_text', 'value' => 'Registration Now Open', 'type' => 'text', 'group' => 'hero'],
            ['key' => 'hero_badge_color', 'value' => 'green', 'type' => 'text', 'group' => 'hero'],
            
            // Contact
            ['key' => 'contact_email', 'value' => 'teflin2026@uinjkt.ac.id', 'type' => 'text', 'group' => 'contact'],
            ['key' => 'contact_phone', 'value' => '+62 21 7401925', 'type' => 'text', 'group' => 'contact'],
            ['key' => 'contact_address', 'value' => "UIN Syarif Hidayatullah Jakarta\nJl. Ir H. Juanda No.95, Ciputat", 'type' => 'text', 'group' => 'contact'],
            
            // Footer
            ['key' => 'footer_copyright', 'value' => '© 2026 TEFLIN International Conference. All rights reserved.', 'type' => 'text', 'group' => 'footer'],
        ];

        foreach ($settings as $setting) {
            Setting::updateOrCreate(
                ['key' => $setting['key']],
                $setting
            );
        }

        // Seed Sub-Themes
        $subThemes = [
            ['title' => 'AI in Language Education', 'description' => 'Exploring the role of artificial intelligence in transforming language teaching and learning', 'icon' => 'lightbulb', 'order' => 1],
            ['title' => 'Digital Literacy & ELT', 'description' => 'Integrating digital tools and media literacy in English language classrooms', 'icon' => 'computer', 'order' => 2],
            ['title' => 'Global Englishes', 'description' => 'Perspectives on World Englishes and their implications for teaching', 'icon' => 'globe', 'order' => 3],
            ['title' => 'Inclusive Education', 'description' => 'Addressing diversity and inclusion in English language teaching contexts', 'icon' => 'users', 'order' => 4],
            ['title' => 'Curriculum & Materials', 'description' => 'Innovative approaches to curriculum design and materials development', 'icon' => 'book', 'order' => 5],
            ['title' => 'Teacher Education', 'description' => 'Professional development and teacher training in the digital age', 'icon' => 'beaker', 'order' => 6],
            ['title' => 'Assessment & Evaluation', 'description' => 'Modern approaches to language assessment and learning evaluation', 'icon' => 'clipboard', 'order' => 7],
            ['title' => 'Multilingualism', 'description' => 'Exploring multilingual education and translanguaging practices', 'icon' => 'language', 'is_featured' => true, 'order' => 8],
        ];

        foreach ($subThemes as $theme) {
            SubTheme::updateOrCreate(
                ['title' => $theme['title']],
                array_merge(['is_active' => true, 'is_featured' => false], $theme)
            );
        }
    }
}
