<?php

namespace Database\Seeders;

use App\Enums\CategoryType;
use App\Models\Category;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;

class CategorySeeder extends Seeder
{
    public function run(): void
    {
        $categories = [
            ['name' => 'Floral', 'description' => 'Perfume with floral scents', 'sort_order' => 1, 'type' => CategoryType::PERFUME],
            ['name' => 'Citrus', 'description' => 'Fresh citrus fragrances', 'sort_order' => 2, 'type' => CategoryType::PERFUME],
            ['name' => 'Woody', 'description' => 'Warm woody notes', 'sort_order' => 3, 'type' => CategoryType::PERFUME],
            ['name' => 'Oriental', 'description' => 'Spicy and exotic oriental scents', 'sort_order' => 4, 'type' => CategoryType::PERFUME],
            ['name' => 'Fruity', 'description' => 'Sweet and fresh fruity fragrances', 'sort_order' => 5, 'type' => CategoryType::PERFUME],
            ['name' => 'Aquatic', 'description' => 'Light, oceanic, and fresh scents', 'sort_order' => 6, 'type' => CategoryType::PERFUME],
            ['name' => 'Gourmand', 'description' => 'Edible, sweet and dessert-like scents', 'sort_order' => 7, 'type' => CategoryType::PERFUME],
            ['name' => 'Green', 'description' => 'Fresh, leafy, and herbal notes', 'sort_order' => 8, 'type' => CategoryType::PERFUME],
            ['name' => 'Chypre', 'description' => 'Classic blend of citrus, oakmoss, and labdanum', 'sort_order' => 9, 'type' => CategoryType::PERFUME],
            ['name' => 'Musk', 'description' => 'Warm, sensual musky fragrances', 'sort_order' => 10, 'type' => CategoryType::PERFUME],
            ['name' => 'Tips n Tricks', 'description' => 'Tips and tricks for using perfumes', 'sort_order' => 11, 'type' => CategoryType::ARTICLE],
            ['name' => 'Perfume Review', 'description' => 'Reviews of perfumes', 'sort_order' => 12, 'type' => CategoryType::ARTICLE],
            ['name' => 'Perfume Set', 'description' => 'Perfume sets', 'sort_order' => 13, 'type' => CategoryType::ARTICLE],
            ['name' => 'How To', 'description' => 'How to use perfumes', 'sort_order' => 14, 'type' => CategoryType::ARTICLE],
        ];

        foreach ($categories as $category) {
            Category::create([
                'name' => $category['name'],
                'slug' => Str::slug($category['name']),
                'description' => $category['description'],
                'sort_order' => $category['sort_order'],
                'type' => $category['type'],
            ]);
        }
    }
}
