<?php

namespace Database\Factories\Witness;

use App\Models\Witness\WitnessStatementAnswer;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<WitnessStatementAnswer>
 */
class WitnessStatementAnswerFactory extends Factory
{
    protected $model = WitnessStatementAnswer::class;

    public function definition(): array
    {
        return [
            'section_key' => 'life_before_care',
            'question_key' => 'where_grew_up',
            'value' => $this->faker->sentence(),
            'origin' => 'user',
            'review_status' => 'manual',
        ];
    }

    public function suggested(): static
    {
        return $this->state(fn () => [
            'origin' => 'evidence',
            'review_status' => 'suggested',
            'provenance' => [
                'dsar_evidence_item_id' => null,
                'page' => 3,
                'excerpt' => $this->faker->sentence(),
                'severity' => 'high',
            ],
        ]);
    }
}
