<?php

namespace Database\Seeders;

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

class SubjectSeeder extends Seeder
{
    public function run(): void
    {
        $subjects = [
            ['name' => 'Matematika',          'code' => 'MTK', 'is_special' => false],
            ['name' => 'Bahasa Indonesia',    'code' => 'BIN', 'is_special' => false],
            ['name' => 'Ilmu Pengetahuan Alam (IPA)', 'code' => 'IPA', 'is_special' => false],
            ['name' => 'Ilmu Pengetahuan Sosial (IPS)', 'code' => 'IPS', 'is_special' => false],
            ['name' => 'Pendidikan Pancasila (PPKn)', 'code' => 'PPKN', 'is_special' => false],
            ['name' => 'Seni Budaya dan Prakarya (SBdP)', 'code' => 'SBDP', 'is_special' => false],
            ['name' => 'Bahasa Inggris',      'code' => 'ING', 'is_special' => true],
            ['name' => 'Pendidikan Agama',    'code' => 'AGM', 'is_special' => true],
            ['name' => 'Pendidikan Jasmani, Olahraga dan Kesehatan (PJOK)', 'code' => 'PJOK', 'is_special' => true],
        ];

        foreach ($subjects as $subject) {
            Subject::updateOrCreate(['code' => $subject['code']], $subject);
        }
    }
}
