<?php

namespace Modules\ClinicCore\Database\Seeders;

use Illuminate\Database\Seeder;
use Modules\ClinicCore\Entities\ClcMedicalCondition;

class MedicalConditionsSeeder extends Seeder
{
    public function run()
    {
        $conditions = [
            ['name' => 'Acne Vulgaris',        'category' => 'Inflammatory',    'is_chronic' => true],
            ['name' => 'Rosacea',              'category' => 'Inflammatory',    'is_chronic' => true],
            ['name' => 'Atopic Clinictitis (Eczema)', 'category' => 'Eczematous', 'is_chronic' => true],
            ['name' => 'Contact Clinictitis',   'category' => 'Eczematous',      'is_chronic' => false],
            ['name' => 'Seborrheic Clinictitis','category' => 'Eczematous',      'is_chronic' => true],
            ['name' => 'Psoriasis',            'category' => 'Papulosquamous',  'is_chronic' => true],
            ['name' => 'Lichen Planus',        'category' => 'Papulosquamous',  'is_chronic' => true],
            ['name' => 'Urticaria (Hives)',    'category' => 'Allergic',        'is_chronic' => false],
            ['name' => 'Angioedema',           'category' => 'Allergic',        'is_chronic' => false],
            ['name' => 'Vitiligo',             'category' => 'Pigmentary',      'is_chronic' => true],
            ['name' => 'Melasma',              'category' => 'Pigmentary',      'is_chronic' => true],
            ['name' => 'Post-Inflammatory Hyperpigmentation', 'category' => 'Pigmentary', 'is_chronic' => false],
            ['name' => 'Tinea (Clinictophytosis)', 'category' => 'Fungal',       'is_chronic' => false],
            ['name' => 'Onychomycosis',        'category' => 'Fungal',          'is_chronic' => true],
            ['name' => 'Candidiasis',          'category' => 'Fungal',          'is_chronic' => false],
            ['name' => 'Impetigo',             'category' => 'Bacterial',       'is_chronic' => false],
            ['name' => 'Cellulitis',           'category' => 'Bacterial',       'is_chronic' => false],
            ['name' => 'Folliculitis',         'category' => 'Bacterial',       'is_chronic' => false],
            ['name' => 'Herpes Simplex',       'category' => 'Viral',           'is_chronic' => true],
            ['name' => 'Herpes Zoster (Shingles)', 'category' => 'Viral',       'is_chronic' => false],
            ['name' => 'Warts (Verruca)',      'category' => 'Viral',           'is_chronic' => false],
            ['name' => 'Molluscum Contagiosum','category' => 'Viral',           'is_chronic' => false],
            ['name' => 'Scabies',              'category' => 'Parasitic',       'is_chronic' => false],
            ['name' => 'Alopecia Areata',      'category' => 'Hair Disorders',  'is_chronic' => true],
            ['name' => 'Androgenetic Alopecia','category' => 'Hair Disorders',  'is_chronic' => true],
            ['name' => 'Actinic Keratosis',    'category' => 'Premalignant',    'is_chronic' => true],
            ['name' => 'Basal Cell Carcinoma', 'category' => 'Skin Cancer',     'is_chronic' => true],
            ['name' => 'Squamous Cell Carcinoma','category' => 'Skin Cancer',   'is_chronic' => true],
            ['name' => 'Melanoma',             'category' => 'Skin Cancer',     'is_chronic' => true],
            ['name' => 'Melanocytic Nevus (Mole)', 'category' => 'Benign Lesion','is_chronic' => false],
            ['name' => 'Seborrheic Keratosis', 'category' => 'Benign Lesion',   'is_chronic' => false],
            ['name' => 'Skin Tag (Acrochordon)','category' => 'Benign Lesion',  'is_chronic' => false],
            ['name' => 'Hidradenitis Suppurativa', 'category' => 'Inflammatory','is_chronic' => true],
        ];

        foreach ($conditions as $condition) {
            ClcMedicalCondition::firstOrCreate(
                ['name' => $condition['name'], 'business_id' => null],
                array_merge($condition, ['status' => 'active'])
            );
        }
    }
}
