<?php

namespace Database\Seeders;

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

class PopupSeeder extends Seeder
{
    /**
     * Seed popup beranda settings.
     * Popup disimpan di tabel settings menggunakan key-value.
     */
    public function run(): void
    {
        $popupSettings = [
            'popup_status'  => 'active',
            'popup_delay'   => '3',
            'popup_link'    => 'https://wa.me/6281234567890',
            'popup_image'   => 'https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?auto=format&fit=crop&w=600&q=80',
        ];

        foreach ($popupSettings as $key => $value) {
            Setting::set($key, $value);
        }

        $this->command->info('✅ PopupSeeder: Pengaturan popup beranda berhasil ditambahkan.');
    }
}
