<?php

namespace Database\Seeders\Pages;

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

/**
 * VisionPageSeeder
 * Seeds the "Vision" public page (slug: vision) and the combined
 * "Vision & Mission" page (slug: vision-mission) used by the nav menu.
 */
class VisionPageSeeder extends Seeder
{
    public function run(): void
    {
        // ── Canonical vision page ─────────────────────────────────────────────
        PublishingPage::updateOrCreate(
            ['slug' => 'vision'],
            [
                'title'            => 'Our Vision',
                'slug'             => 'vision',
                'is_published'     => true,
                'published_at'     => now(),
                'layout'           => 'boxed',
                'show_breadcrumbs' => true,
                'show_sidebar'     => false,
                'seo_meta'         => [
                    'meta_title'       => 'Our Vision — SSHIA',
                    'meta_description' => 'SSHIA\'s vision: to be the leading professional organisation in South Sudan advancing innovation in health informatics and digital solutions for equitable, efficient, and data-driven healthcare.',
                    'keywords'         => ['SSHIA vision', 'digital health South Sudan', 'health informatics vision'],
                ],
                'theme_colors'     => [
                    'primary'   => '#0284c7',
                    'secondary' => '#16a34a',
                ],
                'content_blocks'   => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'Our Vision',
                        'subtitle'         => 'A bold aspiration for the future of health in South Sudan',
                        'height'           => 'medium',
                        'text_alignment'   => 'center',
                        'background_color' => 'from-blue-700 via-blue-800 to-sky-900',
                        'overlay'          => true,
                        'overlay_opacity'  => 0.4,
                        'buttons'          => [
                            ['label' => 'Our Mission', 'url' => '/pages/mission',     'style' => 'primary', 'icon' => 'bullseye'],
                            ['label' => 'About SSHIA', 'url' => '/pages/about-sshia', 'style' => 'outline', 'icon' => 'info-circle'],
                        ],
                    ],

                    // ── Vision Statement ──────────────────────────────────────
                    [
                        'type'        => 'quote',
                        'style'       => 'centered',
                        'quote'       => 'To be the leading professional organisation in South Sudan that advances innovation in health informatics and digital solutions for equitable, efficient, and data-driven healthcare systems for better health outcomes in South Sudan.',
                        'author'      => 'SSHIA Vision Statement',
                        'title'       => 'South Sudan Health Informatics Association',
                        'theme_color' => '#0284c7',
                    ],

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

                    // ── What the Vision Means ─────────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'What Our Vision Means',
                        'description' => 'Four dimensions of the future we are building together',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#0284c7',
                    ],

                    [
                        'type'       => 'card_section',
                        'columns'    => 2,
                        'background' => 'gray',
                        'style'      => 'elevated',
                        'cards'      => [
                            [
                                'title'       => 'Leading Professional Organisation',
                                'description' => 'SSHIA aspires to be the foremost authority and reference point for health informatics in South Sudan — setting standards, shaping policy, and representing the profession nationally and internationally.',
                                'icon'        => 'star',
                                'theme_color' => '#0284c7',
                            ],
                            [
                                'title'       => 'Innovation in Health Informatics',
                                'description' => 'We envision a South Sudan where cutting-edge digital health technologies are developed, adapted, and deployed to solve real healthcare challenges — from electronic health records to telemedicine and AI-assisted diagnostics.',
                                'icon'        => 'lightbulb',
                                'theme_color' => '#d97706',
                            ],
                            [
                                'title'       => 'Equitable & Efficient Healthcare',
                                'description' => 'Our vision is a health system where every South Sudanese citizen — regardless of location, income, or background — has access to quality, digitally-enabled healthcare services.',
                                'icon'        => 'balance-scale',
                                'theme_color' => '#16a34a',
                            ],
                            [
                                'title'       => 'Data-Driven Health Systems',
                                'description' => 'We see a future where health decisions at every level — from the clinic to the Ministry of Health — are guided by accurate, timely, and actionable data, improving outcomes for all.',
                                'icon'        => 'chart-line',
                                'theme_color' => '#7c3aed',
                            ],
                        ],
                    ],

                    // ── Strategic Pillars ─────────────────────────────────────
                    [
                        'type'       => 'text',
                        'title'      => 'The Path to Our Vision',
                        'background' => 'white',
                        'max_width'  => 'default',
                        'text_align' => 'left',
                        'content'    => '<p>Achieving this vision requires sustained effort across multiple fronts. SSHIA is committed to:</p>
<ul>
<li><strong>Building human capital</strong> — training and certifying health informatics professionals who can drive digital transformation from within the health system.</li>
<li><strong>Strengthening infrastructure</strong> — advocating for the digital infrastructure investments needed to support nationwide health information systems.</li>
<li><strong>Forging partnerships</strong> — collaborating with government, academia, the private sector, and international bodies to align efforts and maximise impact.</li>
<li><strong>Generating evidence</strong> — conducting and supporting research that informs policy and demonstrates the value of digital health investments.</li>
<li><strong>Championing inclusion</strong> — ensuring that digital health solutions are designed for and accessible to all communities, including those in remote and underserved areas.</li>
</ul>',
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'boxed',
                        'background_type'  => 'gradient',
                        'background_color' => '#0284c7',
                        'title'            => 'Share Our Vision',
                        'content'          => 'Every member, partner, and supporter brings us closer to a digitally empowered health system in South Sudan. Join us on this journey.',
                        'buttons'          => [
                            ['label' => 'Become a Member', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Our Mission',     'url' => '/pages/mission',    'style' => 'outline', 'icon' => 'bullseye'],
                        ],
                    ],
                ],
            ]
        );

        // ── Alias slug: 'vision-mission' ─────────────────────────────────────
        // The navigation menu and mobile menu link to 'vision-mission'.
        // This combined page presents both Vision and Mission together.
        PublishingPage::updateOrCreate(
            ['slug' => 'vision-mission'],
            [
                'title'            => 'Vision & Mission',
                'slug'             => 'vision-mission',
                'is_published'     => true,
                'published_at'     => now(),
                'layout'           => 'boxed',
                'show_breadcrumbs' => true,
                'show_sidebar'     => false,
                'seo_meta'         => [
                    'meta_title'       => 'Vision & Mission — SSHIA',
                    'meta_description' => 'SSHIA\'s vision and mission: leading professional organisation advancing innovation in health informatics and digital solutions for equitable, efficient, and data-driven healthcare in South Sudan.',
                    'keywords'         => ['SSHIA vision', 'SSHIA mission', 'digital health South Sudan', 'health informatics'],
                ],
                'theme_colors'     => [
                    'primary'   => '#0284c7',
                    'secondary' => '#16a34a',
                ],
                'content_blocks'   => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'Vision & Mission',
                        'subtitle'         => 'The aspirations and purpose that drive everything we do at SSHIA',
                        'height'           => 'medium',
                        'text_alignment'   => 'center',
                        'background_color' => 'from-blue-700 via-blue-800 to-sky-900',
                        'overlay'          => true,
                        'overlay_opacity'  => 0.4,
                        'buttons'          => [
                            ['label' => 'About SSHIA', 'url' => '/pages/about-us',   'style' => 'primary', 'icon' => 'info-circle'],
                            ['label' => 'What We Do',  'url' => '/pages/what-we-do', 'style' => 'outline', 'icon' => 'tasks'],
                        ],
                    ],

                    // ── Vision heading ────────────────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'Our Vision',
                        'description' => 'Where we are going',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#0284c7',
                    ],
                    [
                        'type'        => 'quote',
                        'style'       => 'centered',
                        'quote'       => 'To be the leading professional organisation in South Sudan that advances innovation in health informatics and digital solutions for equitable, efficient, and data-driven healthcare systems for better health outcomes in South Sudan.',
                        'author'      => 'SSHIA Vision Statement',
                        'title'       => 'South Sudan Health Informatics Association',
                        'theme_color' => '#0284c7',
                    ],

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

                    // ── Mission heading ───────────────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'Our Mission',
                        'description' => 'How we get there',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#16a34a',
                    ],
                    [
                        'type'        => 'quote',
                        'style'       => 'centered',
                        'quote'       => 'To bring together healthcare professionals, technologists, policymakers, and stakeholders to foster innovation, collaboration, and capacity building in digital health.',
                        'author'      => 'SSHIA Mission Statement',
                        'title'       => 'South Sudan Health Informatics Association',
                        'theme_color' => '#16a34a',
                    ],

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

                    // ── Vision pillars ────────────────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'What Our Vision Means',
                        'description' => 'Four dimensions of the future we are building together',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#0284c7',
                    ],
                    [
                        'type'       => 'card_section',
                        'columns'    => 2,
                        'background' => 'gray',
                        'style'      => 'elevated',
                        'cards'      => [
                            ['title' => 'Leading Professional Organisation', 'description' => 'SSHIA aspires to be the foremost authority and reference point for health informatics in South Sudan — setting standards, shaping policy, and representing the profession nationally and internationally.', 'icon' => 'star',          'theme_color' => '#0284c7'],
                            ['title' => 'Innovation in Health Informatics',  'description' => 'We envision a South Sudan where cutting-edge digital health technologies are developed, adapted, and deployed to solve real healthcare challenges.',                                                    'icon' => 'lightbulb',     'theme_color' => '#d97706'],
                            ['title' => 'Equitable & Efficient Healthcare',  'description' => 'Our vision is a health system where every South Sudanese citizen — regardless of location, income, or background — has access to quality, digitally-enabled healthcare services.',                     'icon' => 'balance-scale', 'theme_color' => '#16a34a'],
                            ['title' => 'Data-Driven Health Systems',        'description' => 'We see a future where health decisions at every level are guided by accurate, timely, and actionable data, improving outcomes for all.',                                                               'icon' => 'chart-line',    'theme_color' => '#7c3aed'],
                        ],
                    ],

                    // ── Mission pillars ───────────────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'The Four Pillars of Our Mission',
                        'description' => 'Our mission is built on four interconnected communities working together',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#16a34a',
                    ],
                    [
                        'type'       => 'card_section',
                        'columns'    => 2,
                        'background' => 'white',
                        'style'      => 'elevated',
                        'cards'      => [
                            ['title' => 'Healthcare Professionals', 'description' => 'Doctors, nurses, public health officers, HMIS specialists, and M&E experts who are the frontline users and champions of digital health tools in South Sudan.',                                  'icon' => 'user-md',       'theme_color' => '#16a34a'],
                            ['title' => 'Technologists',            'description' => 'Software engineers, IT professionals, data scientists, and digital health developers who build and maintain the systems that power modern healthcare delivery.',                               'icon' => 'laptop-code',   'theme_color' => '#0284c7'],
                            ['title' => 'Policymakers',             'description' => 'Government officials, Ministry of Health leadership, and regulatory bodies who create the enabling environment for digital health to thrive.',                                                'icon' => 'landmark',      'theme_color' => '#7c3aed'],
                            ['title' => 'Stakeholders',             'description' => 'International partners, NGOs, academic institutions, private sector organisations, and community representatives who contribute resources, expertise, and advocacy.',                         'icon' => 'network-wired', 'theme_color' => '#d97706'],
                        ],
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'default',
                        'background_type'  => 'gradient',
                        'background_color' => '#0284c7',
                        'title'            => 'Share Our Vision & Mission',
                        'content'          => 'Every member, partner, and supporter brings us closer to a digitally empowered health system in South Sudan. Join us on this journey.',
                        'buttons'          => [
                            ['label' => 'Become a Member', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'What We Do',      'url' => '/pages/what-we-do', 'style' => 'outline', 'icon' => 'tasks'],
                        ],
                        'trust_indicators' => [
                            ['icon' => 'check-circle', 'text' => 'Non-profit & Independent'],
                            ['icon' => 'check-circle', 'text' => 'Nationally Recognised'],
                            ['icon' => 'check-circle', 'text' => 'Internationally Connected'],
                        ],
                    ],
                ],
            ]
        );
    }
}
