<?php

declare(strict_types=1);

namespace Database\Seeders;

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

final class BlogTagSeeder extends Seeder
{
    public function run(): void
    {
        $names = [
            'Tutorials', 'Deep dives', 'Reviews', 'News', 'Opinion', 'Trends', 'Security', 'Privacy',
            'Cryptocurrency', 'Bitcoin', 'Ethereum', 'DeFi', 'NFTs', 'Trading', 'Investing', 'SaaS',
            'API design', 'JavaScript', 'PHP', 'Laravel', 'React', 'Python', 'TypeScript', 'Kubernetes',
            'AWS', 'Azure', 'GCP', 'GDPR', 'Compliance', 'Fraud prevention', 'Identity', 'Payments',
            'Banking', 'Markets', 'Self-custody', 'Mobile wallets', 'Hardware wallets', 'Phishing',
            'Zero trust', 'Encryption', 'Open source', 'DevOps', 'CI/CD', 'Testing', 'Performance',
            'Accessibility', 'UX research', 'Product strategy', 'Remote work', 'Careers', 'Interviews',
            'Startups', 'Venture capital', 'Bootstrapping', 'Case studies', 'How-to', 'Checklists',
            'Regulation', 'Policy', 'Elections', 'Infrastructure', 'Databases', 'Caching', 'Monitoring',
            'Observability', 'Machine learning', 'LLMs', 'Prompt engineering', 'Ethics', 'Climate tech',
            'PropTech', 'Legal tech', 'Health tech', 'EdTech', 'Gaming industry', 'Streaming', 'Podcasts',
        ];

        foreach ($names as $name) {
            BlogTag::query()->updateOrCreate(
                ['slug' => Str::slug($name)],
                ['name' => $name]
            );
        }
    }
}
