<?php

namespace Database\Seeders\Pages;

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

/**
 * GovernancePageSeeder
 * Seeds the "Governance Structures" public page.
 */
class GovernancePageSeeder extends Seeder
{
    public function run(): void
    {
        PublishingPage::updateOrCreate(
            ['slug' => 'governance'],
            [
                'title'            => 'Governance Structures',
                'slug'             => 'governance',
                'is_published'     => true,
                'published_at'     => now(),
                'layout'           => 'default',
                'show_breadcrumbs' => true,
                'show_sidebar'     => false,
                'seo_meta'         => [
                    'meta_title'       => 'Governance Structures — SSHIA',
                    'meta_description' => 'Learn about the governance structure of the South Sudan Health Informatics Association — the Advisory Board, Board of Trustees, Executive Committee, and General Assembly.',
                    'keywords'         => ['SSHIA governance', 'board of trustees', 'advisory board', 'executive committee', 'general assembly'],
                ],
                'theme_colors'     => [
                    'primary'   => '#1d4ed8',
                    'secondary' => '#16a34a',
                ],
                'content_blocks'   => [

                    // ── Hero ──────────────────────────────────────────────────
                    [
                        'type'             => 'hero',
                        'title'            => 'Governance Structures',
                        'subtitle'         => 'Transparent, accountable, and professional leadership for SSHIA',
                        'height'           => 'medium',
                        'text_alignment'   => 'center',
                        'background_color' => 'from-blue-800 via-blue-900 to-indigo-900',
                        'overlay'          => true,
                        'overlay_opacity'  => 0.4,
                        'buttons'          => [
                            ['label' => 'About SSHIA', 'url' => '/pages/about-sshia', 'style' => 'primary', 'icon' => 'info-circle'],
                            ['label' => 'Join SSHIA', 'url' => '/membership/apply', 'style' => 'outline', 'icon' => 'user-plus'],
                        ],
                    ],

                    // ── Overview ──────────────────────────────────────────────
                    [
                        'type'       => 'text',
                        'title'      => 'Our Governance Framework',
                        'background' => 'white',
                        'max_width'  => 'default',
                        'text_align' => 'left',
                        'content'    => '<p>The South Sudan Health Informatics Association is governed by a clear, transparent, and accountable structure designed to ensure effective leadership, strategic direction, and operational excellence. Our governance framework comprises four distinct bodies, each with defined roles and responsibilities that together provide comprehensive oversight of the Association\'s affairs.</p>
<p>This structure reflects SSHIA\'s core values of accountability, transparency, and professionalism — ensuring that the Association is led with integrity and in the best interests of its members and the communities it serves.</p>',
                    ],

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

                    // ── Governance Bodies Heading ─────────────────────────────
                    [
                        'type'        => 'heading',
                        'level'       => 'h2',
                        'text'        => 'The Four Governance Bodies',
                        'description' => 'Each body plays a distinct and complementary role in the leadership of SSHIA',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#1d4ed8',
                    ],

                    // ── Advisory Board ────────────────────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'right',
                        'background' => 'gray',
                        'theme_color'=> '#1d4ed8',
                        'label'      => 'Governance Body A',
                        'title'      => 'Advisory Board (AB)',
                        'content'    => '<p>The Advisory Board functions as an advisory mechanism to the Chairperson and Members of the Board of Trustees. It provides strategic guidance, expert counsel, and high-level oversight to ensure that SSHIA\'s leadership is informed by the best available expertise and experience.</p>
<p>The Advisory Board is composed of <strong>four senior professionals</strong> drawn from key sectors:</p>',
                        'features'   => [
                            'Ministry of Health — government health sector representation',
                            'Civil Society — Doctors Union / Association of Midwifery and Nurses',
                            'Academia — university and research institution representation',
                            'Private Sector & Partners — industry and international partner representation',
                        ],
                    ],

                    // ── Board of Trustees ─────────────────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'left',
                        'background' => 'white',
                        'theme_color'=> '#7c3aed',
                        'label'      => 'Governance Body B',
                        'title'      => 'Board of Trustees (BOT)',
                        'content'    => '<p>The Board of Trustees is the administrative body that runs the affairs of the Association. It holds ultimate accountability for SSHIA\'s strategic direction, financial stewardship, and organisational integrity.</p>
<p>The BOT is comprised of the <strong>Founding Members</strong> of the Association and other non-founding members who are selected or recruited to the board based on their expertise, experience, and commitment to SSHIA\'s mission.</p>',
                        'features'   => [
                            'Sets the strategic direction and priorities of SSHIA',
                            'Oversees financial management and resource allocation',
                            'Ensures compliance with the SSHIA constitution',
                            'Appoints and supervises the Executive Committee',
                            'Represents SSHIA at the highest institutional level',
                        ],
                    ],

                    // ── Executive Committee ───────────────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'right',
                        'background' => 'gray',
                        'theme_color'=> '#0f766e',
                        'label'      => 'Governance Body C',
                        'title'      => 'Executive Committee (EC)',
                        'content'    => '<p>The Executive Committee members are the employees of the Association who implement projects and programmes on behalf of SSHIA under the supervision of the Chairperson or Secretary General.</p>
<p>The EC is responsible for the day-to-day operational management of SSHIA, translating the strategic direction set by the Board of Trustees into concrete activities, programmes, and outcomes.</p>',
                        'features'   => [
                            'Implements SSHIA programmes and projects',
                            'Manages day-to-day operations of the Association',
                            'Reports to the Chairperson and Secretary General',
                            'Coordinates with partners, members, and stakeholders',
                            'Prepares reports and accounts for the Board of Trustees',
                        ],
                    ],

                    // ── General Assembly ──────────────────────────────────────
                    [
                        'type'       => 'split_screen',
                        'layout'     => 'left',
                        'background' => 'white',
                        'theme_color'=> '#d97706',
                        'label'      => 'Governance Body D',
                        'title'      => 'General Assembly (GA)',
                        'content'    => '<p>The General Assembly is the supreme legislative body of the Association. It represents the collective voice of all SSHIA members and holds the highest authority in matters of constitutional change, strategic direction, and major organisational decisions.</p>
<p>The General Assembly meets regularly to review the Association\'s performance, approve major decisions, and ensure that SSHIA remains accountable to its membership and true to its mission and values.</p>',
                        'features'   => [
                            'Supreme legislative authority of SSHIA',
                            'Approves constitutional amendments and major policy changes',
                            'Elects members of the Board of Trustees',
                            'Reviews and approves annual reports and accounts',
                            'Sets the overall direction and priorities of the Association',
                        ],
                    ],

                    // ── Governance Structure Summary ──────────────────────────
                    [
                        'type'     => 'heading',
                        'level'    => 'h2',
                        'text'     => 'Governance at a Glance',
                        'description' => 'A summary of the four governance bodies and their primary roles',
                        'alignment'   => 'center',
                        'style'       => 'underline',
                        'theme_color' => '#1d4ed8',
                    ],

                    [
                        'type'       => 'card_section',
                        'columns'    => 4,
                        'background' => 'gray',
                        'style'      => 'bordered',
                        'cards'      => [
                            [
                                'title'       => 'Advisory Board',
                                'description' => 'Advisory mechanism to the Chairperson and BOT. 4 senior professionals from Health, Civil Society, Academia, and Private Sector.',
                                'icon'        => 'user-tie',
                                'theme_color' => '#1d4ed8',
                            ],
                            [
                                'title'       => 'Board of Trustees',
                                'description' => 'Administrative body running the affairs of the Association. Comprises Founding Members and selected non-founding members.',
                                'icon'        => 'chess-king',
                                'theme_color' => '#7c3aed',
                            ],
                            [
                                'title'       => 'Executive Committee',
                                'description' => 'Employees of the Association who implement projects under the supervision of the Chairperson or Secretary General.',
                                'icon'        => 'cogs',
                                'theme_color' => '#0f766e',
                            ],
                            [
                                'title'       => 'General Assembly',
                                'description' => 'The supreme legislative body of the Association — the collective voice of all SSHIA members.',
                                'icon'        => 'users',
                                'theme_color' => '#d97706',
                            ],
                        ],
                    ],

                    // ── Governance Principles Accordion ───────────────────────
                    [
                        'type'     => 'accordion',
                        'title'    => 'Governance Principles & Commitments',
                        'subtitle' => 'The values that guide how SSHIA is led and managed',
                        'style'    => 'minimal',
                        'items'    => [
                            [
                                'title'   => 'Accountability',
                                'content' => '<p>Every governance body and individual leader within SSHIA is accountable for their decisions and actions. We maintain clear lines of accountability from the Executive Committee through the Board of Trustees to the General Assembly, ensuring that all members can hold leadership to account.</p>',
                            ],
                            [
                                'title'   => 'Transparency',
                                'content' => '<p>SSHIA is committed to open and transparent governance. We publish annual reports, financial statements, and governance decisions, ensuring that members and stakeholders have access to the information they need to understand how the Association is managed.</p>',
                            ],
                            [
                                'title'   => 'Inclusivity',
                                'content' => '<p>Our governance structure is designed to be inclusive and representative, drawing leadership from across the health, technology, academic, and civil society sectors. We are committed to gender balance and diversity in all governance bodies.</p>',
                            ],
                            [
                                'title'   => 'Integrity',
                                'content' => '<p>All SSHIA leaders and governance body members are expected to uphold the highest standards of personal and professional integrity. We have clear conflict of interest policies and ethical guidelines that govern the conduct of all those in leadership positions.</p>',
                            ],
                        ],
                    ],

                    // ── CTA ───────────────────────────────────────────────────
                    [
                        'type'             => 'cta',
                        'style'            => 'default',
                        'background_type'  => 'gradient',
                        'background_color' => '#1d4ed8',
                        'title'            => 'Engage With SSHIA\'s Governance',
                        'content'          => 'As a member, you have a voice in how SSHIA is governed. Join us and participate in the General Assembly, contribute to working groups, and help shape the future of digital health in South Sudan.',
                        'buttons'          => [
                            ['label' => 'Become a Member', 'url' => '/membership/apply', 'style' => 'primary', 'icon' => 'user-plus'],
                            ['label' => 'About SSHIA', 'url' => '/pages/about-sshia', 'style' => 'outline', 'icon' => 'info-circle'],
                        ],
                        'trust_indicators' => [
                            ['icon' => 'shield-alt', 'text' => 'Accountable Leadership'],
                            ['icon' => 'eye', 'text' => 'Transparent Operations'],
                            ['icon' => 'users', 'text' => 'Member-Driven'],
                        ],
                    ],
                ],
            ]
        );
    }
}
