<?php

namespace Database\Seeders;

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

class CategorySeeder extends Seeder
{
    public function run(): void
    {
        $categories = [
            ['name' => 'Design', 'slug' => 'design', 'emoji' => '🎨', 'description' => 'Logo, poster, ilustrasi, edit foto/video'],
            ['name' => 'Tech', 'slug' => 'tech', 'emoji' => '💻', 'description' => 'Website, app, bot, WordPress, landing page'],
            ['name' => 'Konten', 'slug' => 'konten', 'emoji' => '📱', 'description' => 'Caption, TikTok/IG content, copywriting, manage sosmed'],
            ['name' => 'Jastip', 'slug' => 'jastip', 'emoji' => '🛵', 'description' => 'Jastip lokal, luar kota, luar negeri'],
            ['name' => 'Pickup & Delivery', 'slug' => 'pickup-delivery', 'emoji' => '🚚', 'description' => 'Ambil paket, antar dokumen, kurir personal'],
            ['name' => 'Tutor', 'slug' => 'tutor', 'emoji' => '📚', 'description' => 'Les privat, translate, proofreading, makalah'],
            ['name' => 'Audio', 'slug' => 'audio', 'emoji' => '🎵', 'description' => 'Mixing, voice over, jingle, podcast'],
            ['name' => 'Bisnis & Admin', 'slug' => 'bisnis-admin', 'emoji' => '🤝', 'description' => 'Data entry, riset, virtual assistant'],
            ['name' => 'Lifestyle', 'slug' => 'lifestyle', 'emoji' => '🍱', 'description' => 'Titip masak, dekorasi, photographer dadakan'],
            ['name' => 'Handyman', 'slug' => 'handyman', 'emoji' => '🔧', 'description' => 'Benerin barang, pasang CCTV, servis ringan'],
            ['name' => 'Others', 'slug' => 'others', 'emoji' => '🗂️', 'description' => 'Lainnya yang tidak masuk kategori di atas'],
        ];

        foreach ($categories as $category) {
            Category::firstOrCreate(['slug' => $category['slug']], $category);
        }
    }
}
