<?php

namespace Database\Seeders\Pages;

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

/**
 * AboutSSHIAPageSeeder
 * Seeds the "About SSHIA" public page with full organisational content.
 */
class AboutSSHIAPageSeeder extends Seeder
{
    public function run(): void
    {
        // Canonical slug used by the footer and internal links
        PublishingPage::updateOrCreate(
            ['slug' => 'about-sshia'],
            [
                'title'           => 'About SSHIA',
                'slug'            => 'about-sshia',
                'is_published'    => true,
                'published_at'    => now(),
                'layout'          => 'default',
                'show_breadcrumbs'=> true,
                'show_sidebar'    => false,
                'seo_meta'        => [
                    'meta_title'       => 'About SSHIA — South Sudan Health Informatics Association',
                    'meta_description' => 'Learn about the South Sudan Health Informatics Association (SSHIA) — a non-profit national organisation advancing digital health, policy advocacy, and professional development in South Sudan.',
                    'keywords'         => ['SSHIA', 'South Sudan', 'health informatics', 'digital health', 'about'],
                ],
                'theme_colors'    => [
                    'primary'   => '#16a34a',
                    'secondary' => '#0284c7',
                ],
                'content_blocks'  => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'About SSHIA',
                        'subtitle'         => 'Advancing Digital Health and Informatics for a Healthier South Sudan',
                        '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' => 'Join SSHIA', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Our Vision', 'url' => '/pages/vision', 'style' => 'outline', 'icon' => 'eye'],
                        ],
                    ],

                    // ── Who We Are ────────────────────────────────────────────
                    [
                        'type'       => 'text',
                        'title'      => 'Who We Are',
                        'background' => 'white',
                        'max_width'  => 'default',
                        'text_align' => 'left',
                        'content'    => '<p>The <strong>South Sudan Health Informatics Association (SSHIA)</strong> is an independent national organisation that is non-profit, non-partisan, non-sectarian, and non-political. We bring together healthcare professionals, technologists, policymakers, and stakeholders to foster innovation, collaboration, and capacity building in digital health across South Sudan.</p>
<p>SSHIA works in partnership with communities, local and national authorities, regional and international partners, organisations, and UN agencies to advance digital health development, policy advocacy, and professional development in the field of informatics and digital health in South Sudan.</p>
<p>Our headquarters are located at the <strong>School of Public Health, University of Juba</strong>, P.O. Box 82, Juba, South Sudan. You can reach us at <a href="mailto:info@sshia.org">info@sshia.org</a> or visit <a href="https://www.sshia.org" target="_blank">www.sshia.org</a>.</p>',
                    ],

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

                    // ── Rationale ─────────────────────────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'right',
                        'background' => 'gray',
                        'theme_color'=> '#16a34a',
                        'title'      => 'Why SSHIA Was Established',
                        'content'    => '<p>South Sudan faces significant health system challenges, including limited access to quality healthcare, inadequate health infrastructure, and a shortage of trained health informatics professionals.</p>
<p>Digital health solutions offer transformative opportunities to overcome these barriers — enhancing service delivery, health information management, and data-driven decision-making. SSHIA was established to serve as a catalyst for this transformation, driving digital health development, policy advocacy, and professional growth within the country.</p>',
                        'features'   => [
                            'Bridging the gap between technology and healthcare delivery',
                            'Building a skilled health informatics workforce',
                            'Driving evidence-based policy and standards',
                            'Connecting South Sudan to global digital health networks',
                        ],
                        'button'     => ['label' => 'Our Mission', 'url' => '/pages/mission', 'icon' => 'arrow-right'],
                    ],

                    // ── Objectives ────────────────────────────────────────────
                    [
                        'type'       => 'card_section',
                        'title'      => 'Our Objectives',
                        'subtitle'   => 'Six strategic pillars that guide everything we do',
                        'columns'    => 3,
                        'background' => 'white',
                        'style'      => 'elevated',
                        'cards'      => [
                            [
                                'title'       => 'Promote Digital Health Adoption',
                                'description' => 'Promote the adoption and integration of digital health and informatics into South Sudan\'s healthcare system.',
                                'icon'        => 'laptop-medical',
                                'theme_color' => '#16a34a',
                            ],
                            [
                                'title'       => 'Foster Collaboration',
                                'description' => 'Create a platform for meaningful collaboration among health professionals, technologists, and policymakers.',
                                'icon'        => 'handshake',
                                'theme_color' => '#0284c7',
                            ],
                            [
                                'title'       => 'Capacity Building',
                                'description' => 'Facilitate capacity building and training in health informatics and digital health technologies.',
                                'icon'        => 'chalkboard-teacher',
                                'theme_color' => '#7c3aed',
                            ],
                            [
                                'title'       => 'Policy Development',
                                'description' => 'Influence policy development and establish standards for digital health practices across South Sudan.',
                                'icon'        => 'file-alt',
                                'theme_color' => '#d97706',
                            ],
                            [
                                'title'       => 'Research & Innovation',
                                'description' => 'Support research and innovation in digital health solutions suitable for the South Sudanese context.',
                                'icon'        => 'flask',
                                'theme_color' => '#be185d',
                            ],
                            [
                                'title'       => 'Curriculum Advocacy',
                                'description' => 'Advocate for the inclusion of digital health and informatics in university curricula to produce more specialists.',
                                'icon'        => 'graduation-cap',
                                'theme_color' => '#0f766e',
                            ],
                        ],
                    ],

                    // ── Core Values ───────────────────────────────────────────
                    [
                        'type'     => 'heading',
                        'level'    => 'h2',
                        'text'     => 'Our Core Values',
                        'description' => 'The principles that define how we work and who we are',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#16a34a',
                    ],

                    [
                        'type'       => 'card_section',
                        'columns'    => 4,
                        'background' => 'gray',
                        'style'      => 'bordered',
                        'cards'      => [
                            [
                                'title'       => 'Accountability',
                                'description' => 'We take responsibility for our actions and decisions, ensuring transparency in all we do.',
                                'icon'        => 'balance-scale',
                                'theme_color' => '#16a34a',
                            ],
                            [
                                'title'       => 'Transparency',
                                'description' => 'We operate openly, sharing information freely with our members and stakeholders.',
                                'icon'        => 'eye',
                                'theme_color' => '#0284c7',
                            ],
                            [
                                'title'       => 'Integrity',
                                'description' => 'We uphold the highest ethical standards in all our professional engagements.',
                                'icon'        => 'shield-alt',
                                'theme_color' => '#7c3aed',
                            ],
                            [
                                'title'       => 'Commitment',
                                'description' => 'We are dedicated to our mission and the communities we serve.',
                                'icon'        => 'heart',
                                'theme_color' => '#be185d',
                            ],
                            [
                                'title'       => 'Teamwork',
                                'description' => 'We achieve more together, valuing every member\'s contribution.',
                                'icon'        => 'users',
                                'theme_color' => '#d97706',
                            ],
                            [
                                'title'       => 'Networking & Diversity',
                                'description' => 'We celebrate diversity and build inclusive networks across disciplines and borders.',
                                'icon'        => 'globe-africa',
                                'theme_color' => '#0f766e',
                            ],
                            [
                                'title'       => 'Professionalism',
                                'description' => 'We maintain the highest professional standards in health informatics practice.',
                                'icon'        => 'award',
                                'theme_color' => '#1d4ed8',
                            ],
                            [
                                'title'       => 'Social Justice & Equity',
                                'description' => 'We advocate for equitable access to digital health solutions for all South Sudanese.',
                                'icon'        => 'hands-helping',
                                'theme_color' => '#dc2626',
                            ],
                        ],
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'default',
                        'background_type'  => 'gradient',
                        'background_color' => '#16a34a',
                        'title'            => 'Be Part of the Digital Health Revolution',
                        'content'          => 'Join SSHIA and help shape the future of healthcare in South Sudan through innovation, collaboration, and professional excellence.',
                        'buttons'          => [
                            ['label' => 'Apply for Membership', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Contact Us', 'url' => '/pages/support', 'style' => 'outline', 'icon' => 'envelope'],
                        ],
                        'trust_indicators' => [
                            ['icon' => 'check-circle', 'text' => 'Non-profit & Independent'],
                            ['icon' => 'check-circle', 'text' => 'Nationally Recognised'],
                            ['icon' => 'check-circle', 'text' => 'Internationally Connected'],
                        ],
                    ],
                ],
            ]
        );

        // ── Alias slug: 'about-us' ────────────────────────────────────────────
        // The navigation menu links to 'about-us'. This entry ensures that slug
        // resolves to the same page content as 'about-sshia'.
        PublishingPage::updateOrCreate(
            ['slug' => 'about-us'],
            [
                'title'           => 'About Us',
                'slug'            => 'about-us',
                'is_published'    => true,
                'published_at'    => now(),
                'layout'          => 'default',
                'show_breadcrumbs'=> true,
                'show_sidebar'    => false,
                'seo_meta'        => [
                    'meta_title'       => 'About Us — South Sudan Health Informatics Association',
                    'meta_description' => 'Learn about the South Sudan Health Informatics Association (SSHIA) — a non-profit national organisation advancing digital health, policy advocacy, and professional development in South Sudan.',
                    'keywords'         => ['SSHIA', 'South Sudan', 'health informatics', 'digital health', 'about'],
                ],
                'theme_colors'    => [
                    'primary'   => '#16a34a',
                    'secondary' => '#0284c7',
                ],
                'content_blocks'  => [
                    [
                        'type'             => 'hero',
                        'title'            => 'About Us',
                        'subtitle'         => 'Advancing Digital Health and Informatics for a Healthier South Sudan',
                        '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' => 'Join SSHIA', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Our Vision', 'url' => '/pages/vision', 'style' => 'outline', 'icon' => 'eye'],
                        ],
                    ],
                    [
                        'type'       => 'text',
                        'title'      => 'Who We Are',
                        'background' => 'white',
                        'max_width'  => 'default',
                        'text_align' => 'left',
                        'content'    => '<p>The <strong>South Sudan Health Informatics Association (SSHIA)</strong> is an independent national organisation that is non-profit, non-partisan, non-sectarian, and non-political. We bring together healthcare professionals, technologists, policymakers, and stakeholders to foster innovation, collaboration, and capacity building in digital health across South Sudan.</p>
<p>SSHIA works in partnership with communities, local and national authorities, regional and international partners, organisations, and UN agencies to advance digital health development, policy advocacy, and professional development in the field of informatics and digital health in South Sudan.</p>
<p>Our headquarters are located at the <strong>School of Public Health, University of Juba</strong>, P.O. Box 82, Juba, South Sudan. You can reach us at <a href="mailto:info@sshia.org">info@sshia.org</a> or visit <a href="https://www.sshia.org" target="_blank">www.sshia.org</a>.</p>',
                    ],
                    [
                        'type'   => 'divider',
                        'style'  => 'colored-gradient',
                        'color'  => '#16a34a',
                        'margin' => 'small',
                    ],
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'right',
                        'background' => 'gray',
                        'theme_color'=> '#16a34a',
                        'title'      => 'Why SSHIA Was Established',
                        'content'    => '<p>South Sudan faces significant health system challenges, including limited access to quality healthcare, inadequate health infrastructure, and a shortage of trained health informatics professionals.</p>
<p>Digital health solutions offer transformative opportunities to overcome these barriers — enhancing service delivery, health information management, and data-driven decision-making. SSHIA was established to serve as a catalyst for this transformation.</p>',
                        'features'   => [
                            'Bridging the gap between technology and healthcare delivery',
                            'Building a skilled health informatics workforce',
                            'Driving evidence-based policy and standards',
                            'Connecting South Sudan to global digital health networks',
                        ],
                        'button'     => ['label' => 'Our Mission', 'url' => '/pages/mission', 'icon' => 'arrow-right'],
                    ],
                    [
                        'type'       => 'card_section',
                        'title'      => 'Our Objectives',
                        'subtitle'   => 'Six strategic pillars that guide everything we do',
                        'columns'    => 3,
                        'background' => 'white',
                        'style'      => 'elevated',
                        'cards'      => [
                            ['title' => 'Promote Digital Health Adoption',  'description' => 'Promote the adoption and integration of digital health and informatics into South Sudan\'s healthcare system.', 'icon' => 'laptop-medical',      'theme_color' => '#16a34a'],
                            ['title' => 'Foster Collaboration',             'description' => 'Create a platform for meaningful collaboration among health professionals, technologists, and policymakers.',    'icon' => 'handshake',            'theme_color' => '#0284c7'],
                            ['title' => 'Capacity Building',                'description' => 'Facilitate capacity building and training in health informatics and digital health technologies.',               'icon' => 'chalkboard-teacher',   'theme_color' => '#7c3aed'],
                            ['title' => 'Policy Development',               'description' => 'Influence policy development and establish standards for digital health practices across South Sudan.',          'icon' => 'file-alt',             'theme_color' => '#d97706'],
                            ['title' => 'Research & Innovation',            'description' => 'Support research and innovation in digital health solutions suitable for the South Sudanese context.',           'icon' => 'flask',                'theme_color' => '#be185d'],
                            ['title' => 'Curriculum Advocacy',              'description' => 'Advocate for the inclusion of digital health and informatics in university curricula.',                          'icon' => 'graduation-cap',       'theme_color' => '#0f766e'],
                        ],
                    ],
                    [
                        'type'             => 'cta',
                        'style'            => 'default',
                        'background_type'  => 'gradient',
                        'background_color' => '#16a34a',
                        'title'            => 'Be Part of the Digital Health Revolution',
                        'content'          => 'Join SSHIA and help shape the future of healthcare in South Sudan through innovation, collaboration, and professional excellence.',
                        'buttons'          => [
                            ['label' => 'Apply for Membership', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Contact Us',           'url' => '/pages/contact-us', 'style' => 'outline', 'icon' => 'envelope'],
                        ],
                        'trust_indicators' => [
                            ['icon' => 'check-circle', 'text' => 'Non-profit & Independent'],
                            ['icon' => 'check-circle', 'text' => 'Nationally Recognised'],
                            ['icon' => 'check-circle', 'text' => 'Internationally Connected'],
                        ],
                    ],
                ],
            ]
        );
    }
}
