<?php

namespace Database\Seeders;

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

class CauseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $causes = [
            [
                'id' => 'education',
                'title' => 'Education Support Program',
                'description' => 'Breaking the cycle of poverty by providing underprivileged children with quality schooling, materials, tuition support, and active mentorship.',
                'target_amount' => 500000.00,
                'raised_amount' => 150000.00,
            ],
            [
                'id' => 'livelihood',
                'title' => 'Livelihood & Vocational Training',
                'description' => 'Empowering youths and marginalized women with vocational training, sewing skills, computer courses, and micro-grants to establish stable households.',
                'target_amount' => 300000.00,
                'raised_amount' => 85000.00,
            ],
            [
                'id' => 'wash',
                'title' => 'WASH Initiatives',
                'description' => 'Constructing deep tube wells, building modern community toilet blocks, and distributing clean hygiene kits in remote villages to secure healthy lives.',
                'target_amount' => 200000.00,
                'raised_amount' => 110000.00,
            ],
            [
                'id' => 'relief',
                'title' => 'Disaster Relief & Emergency Response',
                'description' => 'Delivering urgent food supplies, temporary shelters, blankets, and running mobile medical camps when floods and natural disasters strike Bangladesh.',
                'target_amount' => 400000.00,
                'raised_amount' => 240000.00,
            ],
        ];

        foreach ($causes as $cause) {
            Cause::updateOrCreate(['id' => $cause['id']], $cause);
        }
    }
}
