<?php

namespace Database\Factories;

use App\Models\Announcement;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Announcement>
 */
class AnnouncementFactory extends Factory
{
    protected $model = Announcement::class;

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'content' => $this->faker->paragraphs(2, true),
        ];
    }

    /**
     * Indicate that the announcement is important.
     */
    public function important(): static
    {
        return $this->state(fn (array $attributes) => [
            'content' => 'PENTING: '.$this->faker->sentence(10),
        ]);
    }

    /**
     * Indicate that the announcement is informational.
     */
    public function informational(): static
    {
        return $this->state(fn (array $attributes) => [
            'content' => 'INFORMASI: '.$this->faker->paragraph(),
        ]);
    }
}
