<?php

namespace Database\Factories;

use App\Models\Slideshow;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class SlideshowFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Slideshow::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'body' => $this->faker->paragraph,
            'header' => $this->faker->sentence,
            'delay' => 3,
            'layout' => 'full',
            'show_text' => true,
            'text_style' => 'blue',
            'number' => $this->faker->numberBetween(1, 100),
        ];
    }

    public function search()
    {
        return $this->state(function (array $attributes) {
            return [
                'body' => $this->faker->paragraph,
                'header' => $this->faker->sentence,
            ];
        });
    }
}
