<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    public function run(): void
    {
        $superAdmin = User::firstOrCreate(
            ['email' => 'superadmin@gcrpe.gov.mz'],
            [
                'name'              => 'Super Admin',
                'password'          => Hash::make('password'),
                'account_type'      => 'administrativo',
                'status'            => 'active',
                'email_verified_at' => now(),
                'phone'             => '+258 21 000 001',
            ]
        );
        $superAdmin->assignRole('super_admin');

        $admin = User::firstOrCreate(
            ['email' => 'gcrpe@pr.gov.mz'],
            [
                'name'              => 'Gestor 01',
                'nuit'              => '899009900',
                'password'          => Hash::make('password'),
                'account_type'      => 'administrativo',
                'status'            => 'active',
                'email_verified_at' => now(),
                'phone'             => '+258 21 000 002',
            ]
        );
        $admin->assignRole('admin');

        $investor1 = User::firstOrCreate(
            ['email' => 'eben.matavele@gmail.com'],
            [
                'name'              => 'Investidor 01',
                'nuit'              => '400123456',
                'password'          => Hash::make('password'),
                'account_type'      => 'singular',
                'status'            => 'active',
                'email_verified_at' => now(),
                'phone'             => '+258 84 123 4567',
            ]
        );
        $investor1->assignRole('investor');

        $investor2 = User::firstOrCreate(
            ['email' => 'h_gbl@live.com'],
            [
                'name'              => 'MyInvest Lda',
                'nuit'              => '400987654',
                'password'          => Hash::make('password'),
                'account_type'      => 'colectiva',
                'company_name'      => 'MyInvest, Lda.',
                'status'            => 'active',
                'email_verified_at' => now(),
                'phone'             => '+258 84 987 6543',
            ]
        );
        $investor2->assignRole('investor');

        $investor3 = User::firstOrCreate(
            ['email' => 'hermengbl@gmail.com'],
            [
                'name'              => 'Hermen Langa',
                'password'          => Hash::make('password'),
                'account_type'      => 'estrangeiro',
                'country'           => 'ZAF',
                'status'            => 'active',
                'email_verified_at' => now(),
                'phone'             => '+27 11 000 0001',
            ]
        );
        $investor3->assignRole('investor');
    }
}
