<?php

namespace Database\Seeders;

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

class PromotionPackageSeeder extends Seeder
{
    public function run()
    {
        $packages = [
            [
                'name' => 'Basic Boost',
                'description' => 'Get noticed with a budget-friendly boost. Your product appears on Page 2.',
                'price' => 499.00,
                'duration_days' => 7,
                'page_position' => 2,
                'max_products' => 1,
                'priority_level' => 3,
                'badge_text' => 'Boosted',
                'badge_color' => '#17a2b8', // Info Cyan
                'is_active' => true,
            ],
            [
                'name' => 'Standard Visibility',
                'description' => 'Increase your reach significantly. Your product appears on Page 1.',
                'price' => 999.00,
                'duration_days' => 15,
                'page_position' => 1,
                'max_products' => 2,
                'priority_level' => 5,
                'badge_text' => 'Featured',
                'badge_color' => '#0d6efd', // Primary Blue
                'is_active' => true,
            ],
            [
                'name' => 'Premium Spotlight',
                'description' => 'Dominate the listings with high priority placement on Page 1.',
                'price' => 1999.00,
                'duration_days' => 30,
                'page_position' => 1,
                'max_products' => 5,
                'priority_level' => 8,
                'badge_text' => 'Premium',
                'badge_color' => '#ffc107', // Warning Yellow
                'is_active' => true,
            ],
            [
                'name' => 'Ultimate Domination',
                'description' => 'Maximum visibility. Top of Page 1 guaranteed with highest priority.',
                'price' => 4999.00,
                'duration_days' => 30,
                'page_position' => 1,
                'max_products' => 10,
                'priority_level' => 10,
                'badge_text' => 'Top Choice',
                'badge_color' => '#dc3545', // Danger Red
                'is_active' => true,
            ],
        ];

        foreach ($packages as $package) {
            PromotionPackage::updateOrCreate(
                ['name' => $package['name']],
                $package
            );
        }
    }
}
