<?php

namespace Database\Seeders;

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

class SidebarBannersSeeder extends Seeder
{
    /**
     * Seed the sidebar banners for home page.
     */
    public function run(): void
    {
        // Clear existing banners for these positions to avoid duplicates
        Banner::whereIn('position', ['home_top_right_1', 'home_top_right_2'])->delete();

        // Banner 1: Post Buy Requirement (Top Right - Top)
        Banner::create([
            'image' => 'images/buy-requirement.png', // Using public/images path
            'position' => 'home_top_right_1',
            'type' => 'standard',
            'link' => '/post-requirement',
            'active' => true,
        ]);

        // Banner 2: Sell on MiniPort (Top Right - Bottom)
        Banner::create([
            'image' => 'images/port-background.png', // Using public/images path
            'position' => 'home_top_right_2',
            'type' => 'standard',
            'link' => '/register/seller',
            'active' => true,
        ]);

        $this->command->info('✅ Sidebar banners seeded successfully!');
    }
}
