<?php

namespace Database\Seeders;

use App\Models\Communication\PhoneNumberType;
use Illuminate\Database\Seeder;

class PhoneNumberTypeSeeder extends Seeder
{
    public function run(): void
    {
        $types = [
            [
                'name'                => 'Main Line',
                'slug'                => 'main',
                'is_default_outbound' => true,
                'is_client_facing'    => false,
                'auto_record'         => true,
            ],
            [
                'name'                => 'Client Line',
                'slug'                => 'client',
                'is_default_outbound' => false,
                'is_client_facing'    => true,
                'auto_record'         => true,
            ],
            [
                'name'                => 'Evidence Line',
                'slug'                => 'evidence',
                'is_default_outbound' => false,
                'is_client_facing'    => false,
                'auto_record'         => true,
            ],
        ];

        foreach ($types as $type) {
            PhoneNumberType::updateOrCreate(['slug' => $type['slug']], $type);
        }
    }
}
