<?php

declare(strict_types=1);

namespace TechnoArtisan\FilamentCms\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use TechnoArtisan\FilamentCms\Enums\ContactRequest;

class ContactRequestFactory extends Factory
{
    public function definition(): array
    {
        return [
            'name'         => fake()->name(),
            'email'        => fake()->email(),
            'request'      => fake()->randomElement(ContactRequest::toArray()),
            'message'      => fake()->realTextBetween(10, 256),
            'consent'      => '1',
            'ip'           => fake()->ipv4(),
            'user_agent'   => fake()->userAgent(),
            'session_id'   => Str::random(32),
            'session_data' => fake()->realTextBetween(256, 512),
            'answer'       => fake()->words(10, 64),
            'answer_at'    => fake()->boolean()
                ? fake()->date('Y-m-d H:i:s')
                : null,
        ];
    }
}
