<?php

namespace Database\Seeders;

use App\Models\TheftEvent;
use Illuminate\Database\Seeder;

class TheftDetectionSeeder extends Seeder
{
    public function run(): void
    {
        $count = max(0, (int) config('database.seeders.theft_event_count', 0));

        if ($count > 0 && TheftEvent::query()->doesntExist()) {
            TheftEvent::factory()->count($count)->create();
        }
    }
}
