<?php

namespace Database\Seeders;

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

class SpecificPlansSeeder extends Seeder
{
    public function run()
    {
        $plans = [
            [
                'name' => 'Basic Plan (Monthly)',
                'slug' => 'basic-monthly',
                'price_inr' => 350,
                'price_usd' => 6,
                'duration_days' => 30,
                'product_limit' => 10,
                'product_image_limit' => 4,
                'inquiry_limit' => 10,
                'show_contact_details' => true,
                'is_featured' => false,
                'is_active' => true,
                'features' => [
                    '10 Product Listings',
                    '10 Buyer Notifications via Email',
                    'Basic Support',
                    'Contact Details & Company Profile Visible',
                    '4 Images per Product',
                    'Direct Contact via Phone/Email',
                    'Inquiry Button Activated'
                ]
            ],
            [
                'name' => 'Basic Plan (3 Months)',
                'slug' => 'basic-quarterly',
                'price_inr' => 999,
                'price_usd' => 15,
                'duration_days' => 90,
                'product_limit' => 30,
                'product_image_limit' => 4,
                'inquiry_limit' => 30,
                'show_contact_details' => true,
                'is_featured' => true,
                'is_active' => true,
                'features' => [
                    '30 Product Listings',
                    '30 Buyer Notifications via Email',
                    'Basic Support',
                    'Contact Details & Company Profile Visible',
                    '4 Images per Product',
                    'Direct Contact via Phone/Email',
                    'Inquiry Button Activated'
                ]
            ],
            [
                'name' => 'Silver Plan (Monthly)',
                'slug' => 'silver-monthly',
                'price_inr' => 600,
                'price_usd' => 12,
                'duration_days' => 30,
                'product_limit' => 20,
                'product_image_limit' => 4,
                'inquiry_limit' => 20,
                'show_contact_details' => true,
                'is_featured' => false,
                'is_active' => true,
                'features' => [
                    '20 Product Listings',
                    '20 Buyer Notifications via Email',
                    'Basic Support',
                    'Contact Details & Company Profile Visible',
                    '4 Images per Product',
                    'Direct Contact via Phone/Email',
                    'Inquiry Button Activated'
                ]
            ],
            [
                'name' => 'Silver Plan (3 Months)',
                'slug' => 'silver-quarterly',
                'price_inr' => 1699,
                'price_usd' => 32,
                'duration_days' => 90,
                'product_limit' => 60,
                'product_image_limit' => 4,
                'inquiry_limit' => 60,
                'show_contact_details' => true,
                'is_featured' => true,
                'is_active' => true,
                'features' => [
                    '60 Product Listings',
                    '60 Buyer Notifications via Email',
                    'Basic Support',
                    'Contact Details & Company Profile Visible',
                    '4 Images per Product',
                    'Direct Contact via Phone/Email',
                    'Inquiry Button Activated'
                ]
            ]
        ];

        foreach ($plans as $planData) {
            Plan::updateOrCreate(
                ['slug' => $planData['slug']],
                $planData
            );
        }
    }
}
