<?php

namespace Database\Seeders;

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

class MissingSettingsSeeder extends Seeder
{
    public function run()
    {
        $settings = [
            // General Settings
            [
                'key' => 'site_name',
                'value' => 'The Mini Port',
                'group' => 'general',
                'type' => 'text',
                'label' => 'Site Name',
            ],
            [
                'key' => 'site_logo',
                'value' => null,
                'group' => 'general',
                'type' => 'image',
                'label' => 'Site Logo',
            ],
            [
                'key' => 'footer_text',
                'value' => '© 2024 The Mini Port. All rights reserved.',
                'group' => 'general',
                'type' => 'textarea',
                'label' => 'Footer Text',
            ],
            // MOQ Settings
            [
                'key' => 'registration_moq_min',
                'value' => '10',
                'group' => 'general',
                'type' => 'text',
                'label' => 'Registration Min MOQ',
            ],
            [
                'key' => 'registration_moq_max',
                'value' => '150',
                'group' => 'general',
                'type' => 'text',
                'label' => 'Registration Max MOQ',
            ],
        ];

        foreach ($settings as $setting) {
            Setting::updateOrCreate(
                ['key' => $setting['key']],
                $setting
            );
        }
    }
}
