<?php

namespace Database\Seeders\Pages;

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

/**
 * ContactUsPageSeeder
 * Seeds the "Contact Us" public page with slug 'contact-us'.
 * This slug is referenced by the navigation menu and mobile menu.
 */
class ContactUsPageSeeder extends Seeder
{
    public function run(): void
    {
        PublishingPage::updateOrCreate(
            ['slug' => 'contact-us'],
            [
                'title'            => 'Contact Us',
                'slug'             => 'contact-us',
                'is_published'     => true,
                'published_at'     => now(),
                'layout'           => 'default',
                'show_breadcrumbs' => true,
                'show_sidebar'     => false,
                'seo_meta'         => [
                    'meta_title'       => 'Contact Us — South Sudan Health Informatics Association',
                    'meta_description' => 'Get in touch with SSHIA. Reach us by email, phone, or visit our headquarters at the School of Public Health, University of Juba, South Sudan.',
                    'keywords'         => ['SSHIA contact', 'South Sudan health informatics contact', 'SSHIA email', 'SSHIA address'],
                ],
                'theme_colors'     => [
                    'primary'   => '#16a34a',
                    'secondary' => '#0284c7',
                ],
                'content_blocks'   => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'Contact Us',
                        'subtitle'         => 'We would love to hear from you — reach out and let\'s connect',
                        'height'           => 'medium',
                        'text_alignment'   => 'center',
                        'background_color' => 'from-green-700 via-green-800 to-emerald-900',
                        'overlay'          => true,
                        'overlay_opacity'  => 0.45,
                        'show_scroll_indicator' => true,
                        'buttons'          => [
                            ['label' => 'Email Us',    'url' => 'mailto:info@sshia.org',  'style' => 'primary', 'icon' => 'envelope'],
                            ['label' => 'About SSHIA', 'url' => '/pages/about-us',        'style' => 'outline', 'icon' => 'info-circle'],
                        ],
                    ],

                    // ── Contact Details ───────────────────────────────────────
                    [
                        'type'       => 'heading',
                        'level'      => 'h2',
                        'text'       => 'Get In Touch',
                        'description'=> 'Multiple ways to reach the SSHIA team',
                        'alignment'  => 'center',
                        'style'      => 'underline',
                        'theme_color'=> '#16a34a',
                    ],

                    [
                        'type'       => 'card_section',
                        'columns'    => 3,
                        'background' => 'white',
                        'style'      => 'elevated',
                        'cards'      => [
                            [
                                'title'       => 'Email',
                                'description' => 'Send us an email and we will respond within 2 business days. For general enquiries, membership, or partnership opportunities.',
                                'icon'        => 'envelope',
                                'theme_color' => '#16a34a',
                                'link'        => ['label' => 'info@sshia.org', 'url' => 'mailto:info@sshia.org'],
                            ],
                            [
                                'title'       => 'Website',
                                'description' => 'Visit our official website for the latest news, publications, events, and resources from SSHIA.',
                                'icon'        => 'globe',
                                'theme_color' => '#0284c7',
                                'link'        => ['label' => 'www.sshia.org', 'url' => 'https://www.sshia.org'],
                            ],
                            [
                                'title'       => 'Headquarters',
                                'description' => 'School of Public Health, University of Juba, P.O. Box 82, Juba, South Sudan.',
                                'icon'        => 'map-marker-alt',
                                'theme_color' => '#7c3aed',
                            ],
                        ],
                    ],

                    // ── Divider ───────────────────────────────────────────────
                    [
                        'type'   => 'divider',
                        'style'  => 'colored-gradient',
                        'color'  => '#16a34a',
                        'margin' => 'small',
                    ],

                    // ── Departments ───────────────────────────────────────────
                    [
                        'type'       => 'heading',
                        'level'      => 'h2',
                        'text'       => 'Reach the Right Team',
                        'description'=> 'Direct your enquiry to the most relevant department',
                        'alignment'  => 'center',
                        'style'      => 'underline',
                        'theme_color'=> '#0284c7',
                    ],

                    [
                        'type'       => 'card_section',
                        'columns'    => 2,
                        'background' => 'gray',
                        'style'      => 'bordered',
                        'cards'      => [
                            [
                                'title'       => 'Membership Enquiries',
                                'description' => 'Questions about joining SSHIA, membership categories, fees, or your application status? Our membership team is ready to help.',
                                'icon'        => 'users',
                                'theme_color' => '#16a34a',
                                'link'        => ['label' => 'Apply for Membership', 'url' => '/membership/apply'],
                            ],
                            [
                                'title'       => 'Training & Mentorship',
                                'description' => 'Interested in our training programmes, mentorship opportunities, or professional development courses? Contact our programmes team.',
                                'icon'        => 'chalkboard-teacher',
                                'theme_color' => '#0284c7',
                                'link'        => ['label' => 'View Programmes', 'url' => '/training'],
                            ],
                            [
                                'title'       => 'Research & Publications',
                                'description' => 'For research collaboration, publication submissions, or access to our knowledge base and resources.',
                                'icon'        => 'flask',
                                'theme_color' => '#7c3aed',
                                'link'        => ['label' => 'View Publications', 'url' => '/research'],
                            ],
                            [
                                'title'       => 'Partnership & Advocacy',
                                'description' => 'Organisations interested in partnering with SSHIA or supporting our advocacy campaigns are welcome to reach out.',
                                'icon'        => 'handshake',
                                'theme_color' => '#d97706',
                                'link'        => ['label' => 'Become a Partner', 'url' => '/partners/apply'],
                            ],
                        ],
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'default',
                        'background_type'  => 'gradient',
                        'background_color' => '#16a34a',
                        'title'            => 'Ready to Connect?',
                        'content'          => 'Whether you are a health professional, researcher, policymaker, or supporter — SSHIA welcomes you. Reach out today and become part of the digital health movement in South Sudan.',
                        'buttons'          => [
                            ['label' => 'Email Us',           'url' => 'mailto:info@sshia.org', 'style' => 'primary', 'icon' => 'envelope'],
                            ['label' => 'Apply for Membership','url' => '/membership/apply',     'style' => 'outline', 'icon' => 'user-plus'],
                        ],
                        'trust_indicators' => [
                            ['icon' => 'check-circle', 'text' => 'Non-profit & Independent'],
                            ['icon' => 'check-circle', 'text' => 'Based in Juba, South Sudan'],
                            ['icon' => 'check-circle', 'text' => 'Internationally Connected'],
                        ],
                    ],
                ],
            ]
        );
    }
}
