<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class TicketSourceSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $ticketSources = [
            ['name' => 'Chat', 'status' => 'active'],
            ['name' => 'Email', 'status' => 'active'],
            ['name' => 'Phone', 'status' => 'active'],
            ['name' => 'Whatsapp', 'status' => 'active'],
            ['name' => 'Form', 'status' => 'active'],
            ['name' => 'Facebook', 'status' => 'active'],
            ['name' => 'Web', 'status' => 'active'],
            ['name' => 'LinkedIn', 'status' => 'active'],
            ['name' => 'Twitter', 'status' => 'active'],
            ['name' => 'Feedback Widget', 'status' => 'active'],
        ];

        foreach ($ticketSources as $source) {
            DB::table('ticket_sources')->insert([
                'business_id' => null, // You can set a business ID here if required
                'name' => $source['name'],
                'status' => $source['status'],
                'created_at' => now(),
                'updated_at' => now(),
            ]);
        }
    }
}
