<?php

namespace Database\Seeders\Pages;

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

/**
 * MembershipsPageSeeder
 * Seeds the "Memberships" public page with all seven SSHIA membership categories.
 */
class MembershipsPageSeeder extends Seeder
{
    public function run(): void
    {
        PublishingPage::updateOrCreate(
            ['slug' => 'memberships'],
            [
                'title'            => 'Memberships',
                'slug'             => 'memberships',
                'is_published'     => true,
                'published_at'     => now(),
                'layout'           => 'default',
                'show_breadcrumbs' => true,
                'show_sidebar'     => false,
                'seo_meta'         => [
                    'meta_title'       => 'Membership — Join SSHIA',
                    'meta_description' => 'Join the South Sudan Health Informatics Association. Explore our seven membership categories — from Founder and Ordinary Members to Institutional, Graduate, and Affiliate Members.',
                    'keywords'         => ['SSHIA membership', 'join SSHIA', 'health informatics membership', 'South Sudan'],
                ],
                'theme_colors'     => [
                    'primary'   => '#16a34a',
                    'secondary' => '#7c3aed',
                ],
                'content_blocks'   => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'Join SSHIA',
                        'subtitle'         => 'Be part of South Sudan\'s growing community of digital health professionals',
                        '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' => 'Apply Now', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Learn More', 'url' => '#membership-categories', 'style' => 'outline', 'icon' => 'chevron-down'],
                        ],
                    ],

                    // ── Eligibility ───────────────────────────────────────────
                    [
                        'type'       => 'text',
                        'title'      => 'Who Can Join?',
                        'background' => 'white',
                        'max_width'  => 'default',
                        'text_align' => 'left',
                        'content'    => '<p>All Health Informatics Experts, HMIS/M&E experts, IT/Software Engineers, and Health Professionals of the Republic of South Sudan who signify their agreement with and are prepared to abide by the SSHIA constitution may apply for membership.</p>
<p>SSHIA also welcomes non-South Sudanese health and informatics experts, international organisations, and academic institutions that share our commitment to advancing digital health in South Sudan and the broader region.</p>',
                    ],

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

                    // ── Membership Categories Heading ─────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'Membership Categories',
                        'description' => 'SSHIA offers seven membership categories to accommodate the diverse range of individuals and organisations committed to advancing digital health in South Sudan.',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#16a34a',
                    ],

                    // ── Category Cards ────────────────────────────────────────
                    [
                        'type'       => 'card_section',
                        'columns'    => 3,
                        'background' => 'gray',
                        'style'      => 'elevated',
                        'cards'      => [
                            [
                                'title'       => 'Founder Members',
                                'description' => 'Those who originally established SSHIA and declared the establishment of this Association. Founder Members hold a unique and permanent place in the history and governance of SSHIA.',
                                'icon'        => 'crown',
                                'theme_color' => '#7c3aed',
                            ],
                            [
                                'title'       => 'Ordinary Members',
                                'description' => 'Open to any South Sudanese Health and Informatics expert aged 18 years or above who demonstrates willingness and ability to spearhead the objectives and vision of SSHIA.',
                                'icon'        => 'user-check',
                                'theme_color' => '#16a34a',
                            ],
                            [
                                'title'       => 'Associate Members',
                                'description' => 'Open to any non-South Sudanese Health and Informatics expert aged 18 years or above who shows willingness and ability to advance the objectives and vision of SSHIA.',
                                'icon'        => 'user-friends',
                                'theme_color' => '#0284c7',
                            ],
                            [
                                'title'       => 'Honorary Members',
                                'description' => 'Awarded by nomination of the Founder Members to individuals who have demonstrated exceptional merit in furthering the aims and interests of SSHIA.',
                                'icon'        => 'award',
                                'theme_color' => '#d97706',
                            ],
                            [
                                'title'       => 'Institutional Members',
                                'description' => 'Two sub-categories: Corporate members (vendors, consulting firms, technology companies, national professional organisations) and Academic members (universities, medical centres, research institutions).',
                                'icon'        => 'building',
                                'theme_color' => '#0f766e',
                            ],
                            [
                                'title'       => 'Graduate Members',
                                'description' => 'Graduate professionals who will be mentored and supported in their transition to Ordinary Membership, contributing to the growth of health and health informatics professionals in South Sudan.',
                                'icon'        => 'user-graduate',
                                'theme_color' => '#2563eb',
                            ],
                        ],
                    ],

                    // ── Affiliate Members (full width) ────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'left',
                        'background' => 'white',
                        'theme_color'=> '#be185d',
                        'label'      => 'International Category',
                        'title'      => 'Affiliate Members',
                        'content'    => '<p>Affiliate Membership is open to international organisations that share an interest in the broad field of health and health informatics. Affiliate Members contribute to SSHIA\'s global connectivity, bringing international perspectives, resources, and partnerships that strengthen South Sudan\'s digital health ecosystem.</p>
<p>Affiliate Members participate in SSHIA events, contribute to knowledge sharing, and collaborate on joint advocacy and research initiatives.</p>',
                        'features'   => [
                            'International partnership and collaboration opportunities',
                            'Access to SSHIA research and knowledge-sharing platforms',
                            'Joint advocacy and policy engagement',
                            'Participation in SSHIA international conferences',
                            'Cross-organisational networking and resource sharing',
                        ],
                        'button'     => ['label' => 'Apply for Affiliate Membership', 'url' => '/membership/apply', 'icon' => 'globe'],
                    ],

                    // ── Membership Benefits Accordion ─────────────────────────
                    [
                        'type'     => 'accordion',
                        'title'    => 'Membership Benefits & Requirements',
                        'subtitle' => 'Everything you need to know about joining SSHIA',
                        'style'    => 'bordered',
                        'items'    => [
                            [
                                'title'   => 'What are the general benefits of SSHIA membership?',
                                'content' => '<p>All SSHIA members benefit from:</p>
<ul>
<li>Access to a national network of health informatics professionals</li>
<li>Invitations to SSHIA conferences, workshops, and seminars</li>
<li>Access to the SSHIA knowledge base, publications, and research resources</li>
<li>Professional development and capacity-building opportunities</li>
<li>Membership certificate and digital professional ID</li>
<li>Opportunity to contribute to national digital health policy and standards</li>
<li>Voting rights (for eligible categories) in SSHIA governance</li>
</ul>',
                            ],
                            [
                                'title'   => 'What are the eligibility requirements for Ordinary Membership?',
                                'content' => '<p>To qualify for Ordinary Membership, applicants must:</p>
<ul>
<li>Be a South Sudanese national</li>
<li>Be a Health and Informatics expert (including HMIS/M&E, IT/Software Engineering, or Health Professional)</li>
<li>Be at least 18 years of age</li>
<li>Demonstrate willingness and ability to advance the objectives and vision of SSHIA</li>
<li>Agree to abide by the SSHIA constitution and code of conduct</li>
</ul>',
                            ],
                            [
                                'title'   => 'How does the Graduate Membership pathway work?',
                                'content' => '<p>Graduate Membership is designed as a structured pathway for recent graduates entering the health informatics profession. Graduate Members receive:</p>
<ul>
<li>Mentorship from experienced SSHIA members</li>
<li>Structured professional development support</li>
<li>Reduced membership fees during the graduate transition period</li>
<li>A clear pathway to Ordinary Membership upon meeting the required criteria</li>
</ul>
<p>The Graduate Membership programme is central to SSHIA\'s commitment to growing the next generation of health informatics professionals in South Sudan.</p>',
                            ],
                            [
                                'title'   => 'How are Honorary Members selected?',
                                'content' => '<p>Honorary Membership is a prestigious recognition awarded by nomination of the Founder Members. Candidates are individuals who have demonstrated exceptional merit in furthering the aims and interests of SSHIA — whether through outstanding contributions to digital health in South Sudan, significant advocacy work, or exceptional service to the Association.</p>
<p>Honorary Members are not required to pay membership fees and hold their status for life.</p>',
                            ],
                            [
                                'title'   => 'What types of organisations qualify for Institutional Membership?',
                                'content' => '<p>Institutional Membership is available to two categories of organisations:</p>
<p><strong>Corporate Members:</strong> Vendor companies, consulting firms, technology companies, and national professional organisations operating in the health and informatics sector.</p>
<p><strong>Academic Members:</strong> Universities, medical centres, research centres, and similar academic and research institutions with an interest in health informatics and digital health.</p>',
                            ],
                            [
                                'title'   => 'How do I apply for membership?',
                                'content' => '<p>To apply for SSHIA membership:</p>
<ol>
<li>Review the membership categories and identify the one that best fits your profile</li>
<li>Click the "Apply Now" button on this page or visit the membership application portal</li>
<li>Complete the online application form with your personal and professional details</li>
<li>Submit any required supporting documents</li>
<li>Your application will be reviewed by the SSHIA membership committee</li>
<li>You will be notified of the outcome within 30 days</li>
</ol>
<p>For assistance with your application, please contact us at <a href="mailto:info@sshia.org">info@sshia.org</a>.</p>',
                            ],
                        ],
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'boxed',
                        'background_type'  => 'gradient',
                        'background_color' => '#16a34a',
                        'title'            => 'Ready to Join SSHIA?',
                        'content'          => 'Take the first step towards becoming part of South Sudan\'s leading digital health professional community. Applications are open year-round.',
                        'buttons'          => [
                            ['label' => 'Apply for Membership', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'Contact Us', 'url' => '/pages/support', 'style' => 'outline', 'icon' => 'envelope'],
                        ],
                    ],
                ],
            ]
        );
    }
}
