<?php

namespace Database\Seeders;

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

class CmsSettingSeeder extends Seeder
{
    public function run(): void
    {
        $settings = [
            ['key' => 'app_name', 'value' => 'LEASINGPRO', 'type' => 'text', 'group' => 'landing'],
            ['key' => 'app_subtitle', 'value' => 'Platform Manajemen Data Leasing dan Pencarian Kendaraan Terpadu.', 'type' => 'text', 'group' => 'landing'],
            ['key' => 'hero_background', 'value' => 'bg-slate-50', 'type' => 'text', 'group' => 'landing'],
            ['key' => 'login_button_text', 'value' => 'Masuk Sistem', 'type' => 'text', 'group' => 'landing'],
            ['key' => 'register_button_text', 'value' => 'Daftar Akun', 'type' => 'text', 'group' => 'landing'],
            ['key' => 'front_logo', 'value' => '', 'type' => 'text', 'group' => 'landing'],
        ];

        foreach ($settings as $setting) {
            DB::table('cms_settings')->updateOrInsert(['key' => $setting['key']], $setting);
        }
    }
}
