<?php

namespace Database\Seeders;

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

class SliderSeeder extends Seeder
{
    public function run(): void
    {
        $sliders = [
            ['title' => 'Summer Sale', 'subtitle' => 'Up to 50% off on all electronics', 'button_text' => 'Shop Now', 'order' => 1],
            ['title' => 'New Arrivals', 'subtitle' => 'Check out the latest smartphones', 'button_text' => 'Explore', 'order' => 2],
            ['title' => 'Free Shipping', 'subtitle' => 'On orders above ৳5000', 'button_text' => 'Learn More', 'order' => 3],
            ['title' => 'Flash Sale', 'subtitle' => 'Limited time offers', 'button_text' => 'Grab Now', 'order' => 4],
        ];

        foreach ($sliders as $slider) {
            Slider::create([
                'title' => $slider['title'],
                'subtitle' => $slider['subtitle'],
                'image' => 'sliders/slider-' . $slider['order'] . '.jpg',
                'button_text' => $slider['button_text'],
                'button_link' => '/products',
                'order' => $slider['order'],
                'is_active' => true,
            ]);
        }
    }
}