<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class CategoryFactory extends Factory
{
    public function definition(): array
    {
        $name = fake()->unique()->randomElement([
            'Sembako',
            'Camilan',
            'Minuman',
            'Makanan Siap Saji',
            'Lauk Pauk',
            'Snack Anak',
            'Kebutuhan Rumah',
            'Bumbu Dapur',
            'Kue & Roti',
            'Frozen Food',
        ]);

        return [
            'name'       => $name,
            'slug'       => Str::slug($name),
            'image'      => null,
            'is_active'  => true,
            'sort_order' => fake()->numberBetween(0, 10),
        ];
    }
}
