<?php

namespace Database\Factories;

use App\Enums\RolaPouzivatelaEnum;
use App\Models\Informacia\Enums\StavInformacieEnum;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * Class InformaciaFactory
 */
class InformaciaFactory extends Factory
{
    public function definition(): array
    {
        return [
            'titulok' => $this->faker->text(maxNbChars: 64),
            'uvod' => $this->faker->text(maxNbChars: 256),
            'obsah' => $this->faker->randomHtml(),
            'stav' => $this->faker->randomElement(StavInformacieEnum::cases()),
            'zverejnit_pre_pouzivatelov_podla_role' => $this->faker->randomElements(
                RolaPouzivatelaEnum::cases(),
                rand(1, 5),
            ),
            'planovany_cas_zverejnenia' => $this->faker->dateTime(),
            'odoslat_email_na_pek' => $this->faker->boolean(),
            'odoslat_email_pouzivatelom' => $this->faker->boolean(),
            'odoslat_push_notifikacie_pouzivatelom' => $this->faker->boolean(),
            'cas_zverejnenia' => $this->faker->dateTime(),
            'odporucane' => $this->faker->boolean(),
        ];
    }
}
