<?php

namespace Database\Seeders;

use App\Models\NavigationMenu;
use App\Services\NavigationMenuService;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Cache;

class NavigationMenuSeeder extends Seeder
{
    public function run(): void
    {
        if (NavigationMenu::count() > 0) {
            return;
        }

        app(NavigationMenuService::class)->syncRecommendedHeaderMenus();
        Cache::forget('navigation_menus.header');
    }
}
