<?php

namespace Modules\Dummy\Database\Seeders\Modules\Subscription\versions\v7_5_0;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class MenuItemsTableSeeder extends Seeder
{
    public function run(): void
    {
        $parentId = DB::table('menu_items')->where('label', 'AI Features')->value('id');

        DB::table('menu_items')->updateOrInsert(
            ['link' => 'plagiarism/list'],
            [
                'label' => 'Plagiarism',
                'link' => 'plagiarism/list',
                'params' => '{"permission":"Modules\\\\OpenAI\\\\Http\\\\Controllers\\\\Admin\\\\PlagiarismController@index","route_name":["admin.features.plagiarism.list","admin.features.plagiarism.show","admin.features.plagiarism.delete","admin.features.plagiarism.pdf","admin.features.plagiarism.csv"]}',
                'is_default' => 1,
                'icon' => null,
                'parent' => $parentId,
                'sort' => 24,
                'class' => null,
                'menu' => 1,
                'depth' => 1,
                'is_custom_menu' => 0,
            ]
        );

        DB::table('menu_items')->updateOrInsert(
            ['link' => 'ai-detector/list'],
            [
                'label' => 'AI Detector',
                'link' => 'ai-detector/list',
                'params' => '{"permission":"Modules\\\\OpenAI\\\\Http\\\\Controllers\\\\Admin\\\\AiDetectorController@index","route_name":["admin.features.ai_detector.list","admin.features.ai_detector.show","admin.features.ai_detector.delete","admin.features.ai_detector.pdf","admin.features.ai_detector.csv"]}',
                'is_default' => 1,
                'icon' => null,
                'parent' => $parentId,
                'sort' => 25,
                'class' => null,
                'menu' => 1,
                'depth' => 1,
                'is_custom_menu' => 0,
            ]
        );
    }
}
