<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // Seed currencies first (required for other tables)
        $this->call(CurrencySeeder::class);

        // Seed system categories
        $this->call(CategorySeeder::class);

        // Create Admin User
        User::updateOrCreate(
            ['email' => 'admin@mymoney.com'],
            [
                'name' => 'Admin',
                'password' => \Illuminate\Support\Facades\Hash::make('admin123'),
                'email_verified_at' => now(),
            ]
        );

        // NOTE: DemoDataSeeder is disabled for production
        // Uncomment line below to add demo data for testing
        // $this->call(DemoDataSeeder::class);
    }
}
