<?php

namespace Database\Seeders;

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

class CategorySeeder extends Seeder
{
    public function run(): void
    {
        $electronics = Category::create([
            'name' => 'Electronics',
            'slug' => 'electronics',
            'is_active' => true,
        ]);

        $mobiles = Category::create([
            'name' => 'Mobile Phones',
            'slug' => 'mobile-phones',
            'parent_id' => $electronics->id,
            'is_active' => true,
        ]);

        $laptops = Category::create([
            'name' => 'Laptops',
            'slug' => 'laptops',
            'parent_id' => $electronics->id,
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Smartphones',
            'slug' => 'smartphones',
            'parent_id' => $mobiles->id,
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Feature Phones',
            'slug' => 'feature-phones',
            'parent_id' => $mobiles->id,
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Gaming Laptops',
            'slug' => 'gaming-laptops',
            'parent_id' => $laptops->id,
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Accessories',
            'slug' => 'accessories',
            'parent_id' => $electronics->id,
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Audio',
            'slug' => 'audio',
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Cameras',
            'slug' => 'cameras',
            'is_active' => true,
        ]);

        Category::create([
            'name' => 'Wearables',
            'slug' => 'wearables',
            'is_active' => true,
        ]);
    }
}