<?php

namespace Database\Seeders;

use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Support\Facades\File;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        $sourcePath = database_path('seeders/dummy_image');
        $destinationPath = storage_path('app/public/branding');

        if (File::exists($sourcePath)) {
            File::ensureDirectoryExists(storage_path('app/public'));
            File::copyDirectory($sourcePath, $destinationPath);
        }

        $this->call([
            AttendanceSettingSeeder::class,
            BrandingSeeder::class,
            RoleSeeder::class,
            DepartmentSeeder::class,
            AdminUserSeeder::class,
            EmployeeSeeder::class,
            AttendanceSeeder::class,
            LeaveTypeSeeder::class,
            LeaveRequestSeeder::class,
            AssetSeeder::class,
            SalaryComponentSeeder::class,
            PayrollStructureSeeder::class,
            EmployeeSalaryAssignmentSeeder::class,
            BonusSeeder::class,
            LoanSeeder::class,
            SalaryCertificateRequestSeeder::class,
        ]);

        // User::factory(10)->create();
    }
}
