<?php

namespace Database\Seeders;

use App\Models\Mentorship\Category;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;

/**
 * MentorshipCategorySeeder
 *
 * Seeds the four core SSHIA mentorship categories that structure the
 * professional development pathways available to members of the
 * South Sudan Health Informatics Association. Each category represents
 * a distinct mentorship domain aligned with SSHIA's strategic objectives
 * of building a competent, ethical, and innovative health informatics
 * workforce in South Sudan.
 *
 * Uses updateOrCreate keyed on slug for idempotency — safe to re-run.
 */
class MentorshipCategorySeeder extends Seeder
{
    public function run(): void
    {
        $categories = [
            [
                'name'        => 'Clinical Mentorship',
                'slug'        => 'clinical-mentorship',
                'description' => 'A structured one-on-one mentorship programme pairing experienced clinicians and health informatics specialists with emerging health professionals in South Sudan. Focuses on clinical skills development, patient safety, evidence-based practice, and the integration of health information systems into clinical workflows. Mentees gain practical guidance from seasoned practitioners committed to elevating the standard of clinical care across South Sudan\'s health facilities.',
                'icon'        => 'fa-user-md',
                'color'       => '#dc2626',
                'sort_order'  => 1,
                'is_active'   => true,
            ],
            [
                'name'        => 'Research Mentorship',
                'slug'        => 'research-mentorship',
                'description' => 'A dedicated mentorship track for SSHIA members pursuing health research, academic publication, and evidence generation. Experienced researchers guide mentees through the full research lifecycle — from conceptualisation and ethical approval to data collection, analysis, and dissemination. This programme supports SSHIA\'s mission to produce locally relevant health research that informs national health policy and contributes to the global body of knowledge on health informatics in sub-Saharan Africa.',
                'icon'        => 'fa-flask',
                'color'       => '#7c3aed',
                'sort_order'  => 2,
                'is_active'   => true,
            ],
            [
                'name'        => 'Leadership Mentorship',
                'slug'        => 'leadership-mentorship',
                'description' => 'A transformational mentorship programme designed to cultivate the next generation of health sector leaders in South Sudan. Senior health administrators, policy makers, and governance experts mentor emerging leaders on strategic planning, health systems governance, stakeholder engagement, and institutional management. Participants develop the vision, skills, and networks required to drive meaningful change within South Sudan\'s health system at facility, county, state, and national levels.',
                'icon'        => 'fa-chess-king',
                'color'       => '#d97706',
                'sort_order'  => 3,
                'is_active'   => true,
            ],
            [
                'name'        => 'Career Development',
                'slug'        => 'career-development',
                'description' => 'A holistic mentorship programme supporting SSHIA members at all career stages — from recent graduates to mid-career professionals seeking advancement. Mentors provide personalised guidance on career planning, professional networking, continuing education, job search strategies, and navigating the health informatics job market in South Sudan and the East African region. This programme is particularly valuable for graduate members transitioning into full professional practice and for members seeking to expand their impact within the health sector.',
                'icon'        => 'fa-briefcase',
                'color'       => '#16a34a',
                'sort_order'  => 4,
                'is_active'   => true,
            ],
        ];

        foreach ($categories as $data) {
            Category::updateOrCreate(
                ['slug' => $data['slug']],
                $data
            );
        }

        $this->command->info('MentorshipCategorySeeder: 4 mentorship categories seeded successfully.');
    }
}
