<?php

namespace Database\Factories;

use App\Models\Page;
use App\Models\PageBlock;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<PageBlock>
 */
class PageBlockFactory extends Factory
{
    /**
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'page_id' => Page::factory(),
            'type' => fake()->randomElement(['hero', 'text_image', 'stats_grid', 'cta', 'gallery']),
            'content' => [
                'title' => fake()->sentence(3),
                'text' => fake()->paragraph(),
            ],
            'order_index' => fake()->numberBetween(0, 10),
            'is_active' => true,
        ];
    }
}
