<?php

namespace Database\Seeders;

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

class CategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $categories = [
            [
                'name' => 'Devices',
                'name_ar' => 'أجهزة',
                'slug' => 'devices',
                'description' => 'Mobile phones, tablets, and smart devices',
                'icon' => 'fas fa-mobile-alt',
                'color' => '#3b82f6', // Blue
                'sort_order' => 1,
                'is_active' => true,
            ],
            [
                'name' => 'Accessories',
                'name_ar' => 'إكسسوارات',
                'slug' => 'accessories',
                'description' => 'Cases, chargers, cables, headphones, and other accessories',
                'icon' => 'fas fa-headphones',
                'color' => '#10b981', // Green
                'sort_order' => 2,
                'is_active' => true,
            ],
            [
                'name' => 'Repair & Fixation',
                'name_ar' => 'صيانة وإصلاح',
                'slug' => 'repair-fixation',
                'description' => 'Repair parts, tools, and fixation services',
                'icon' => 'fas fa-tools',
                'color' => '#f59e0b', // Amber
                'sort_order' => 3,
                'is_active' => true,
            ],
        ];

        foreach ($categories as $category) {
            Category::create($category);
        }
    }
}
