<?php

namespace Database\Seeders;

use App\Models\Event;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class EventSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $events = [
            // Wine Tastings
            [
                'name' => 'Premium Wine Tasting Experience',
                'description' => 'Join us for an exclusive evening of premium wine tasting. Sample our finest selections including Grüner Veltliner Cabinet, Riesling Berry Selection, and Blaufränkisch Reserve. Our sommelier will guide you through the tasting notes and wine-making process.',
                'type' => 'tasting',
                'event_date' => now()->addDays(14),
                'event_time' => '18:00:00',
                'capacity' => 25,
                'price_per_person' => 35.00,
                'status' => 'upcoming',
                'location' => 'Main Tasting Room',
            ],
            [
                'name' => 'White Wine Masterclass',
                'description' => 'Discover the secrets of our white wine collection. This masterclass focuses on Grüner Veltliner, Riesling, and Chardonnay varieties. Learn about fermentation, aging, and pairing suggestions from our expert winemakers.',
                'type' => 'tasting',
                'event_date' => now()->addDays(21),
                'event_time' => '17:00:00',
                'capacity' => 20,
                'price_per_person' => 40.00,
                'status' => 'upcoming',
                'location' => 'Barrel Room',
            ],
            [
                'name' => 'Red Wine & Cheese Pairing',
                'description' => 'Experience the perfect harmony of red wines and artisanal cheeses. Taste our Blaufränkisch and St. Laurent wines paired with carefully selected cheeses from local producers.',
                'type' => 'tasting',
                'event_date' => now()->addDays(28),
                'event_time' => '19:00:00',
                'capacity' => 30,
                'price_per_person' => 45.00,
                'status' => 'upcoming',
                'location' => 'Main Tasting Room',
            ],

            // Harvest Festivals
            [
                'name' => 'Autumn Harvest Festival',
                'description' => 'Celebrate the harvest season with us! Join our traditional grape harvest festival featuring live music, local cuisine, wine tasting, and vineyard tours. Experience the joy of grape picking and learn about traditional wine-making methods.',
                'type' => 'harvest_festival',
                'event_date' => now()->addDays(45),
                'event_time' => '11:00:00',
                'capacity' => 100,
                'price_per_person' => 25.00,
                'status' => 'upcoming',
                'location' => 'Main Vineyard',
            ],
            [
                'name' => 'Grape Stomping Experience',
                'description' => 'Join us for a fun-filled afternoon of traditional grape stomping! Get your feet purple while making wine the old-fashioned way. Includes wine tasting, live folk music, and traditional refreshments.',
                'type' => 'harvest_festival',
                'event_date' => now()->addDays(52),
                'event_time' => '14:00:00',
                'capacity' => 50,
                'price_per_person' => 20.00,
                'status' => 'upcoming',
                'location' => 'Fermentation Pavilion',
            ],

            // Vineyard Tours
            [
                'name' => 'Guided Vineyard Tour & Tasting',
                'description' => 'Explore our beautiful vineyard with a guided tour. Walk through rows of Grüner Veltliner, Riesling, and Blaufränkisch vines. Learn about viticulture, terroir, and sustainable farming practices. Tour concludes with a wine tasting session.',
                'type' => 'vineyard_tour',
                'event_date' => now()->addDays(7),
                'event_time' => '10:00:00',
                'capacity' => 15,
                'price_per_person' => 30.00,
                'status' => 'upcoming',
                'location' => 'Vineyard Starting Point',
            ],
            [
                'name' => 'Sunrise Vineyard Walk',
                'description' => 'Experience the vineyard at its most beautiful moment. This early morning tour includes a peaceful walk through the vines as the sun rises, followed by a light breakfast and wine tasting in our garden.',
                'type' => 'vineyard_tour',
                'event_date' => now()->addDays(10),
                'event_time' => '06:30:00',
                'capacity' => 12,
                'price_per_person' => 35.00,
                'status' => 'upcoming',
                'location' => 'East Vineyard',
            ],
            [
                'name' => 'Behind the Scenes: Cellar Tour',
                'description' => 'Go behind the scenes and explore our wine cellar and production facility. See where the magic happens - from fermentation tanks to aging barrels. Includes exclusive barrel tasting and a bottle of wine to take home.',
                'type' => 'vineyard_tour',
                'event_date' => now()->addDays(35),
                'event_time' => '15:00:00',
                'capacity' => 20,
                'price_per_person' => 50.00,
                'status' => 'upcoming',
                'location' => 'Wine Cellar',
            ],

            // Past Events (for testing)
            [
                'name' => 'Spring Wine Festival',
                'description' => 'Our annual spring wine festival featuring new vintage releases.',
                'type' => 'harvest_festival',
                'event_date' => now()->subDays(30),
                'event_time' => '12:00:00',
                'capacity' => 80,
                'price_per_person' => 20.00,
                'status' => 'completed',
                'location' => 'Main Vineyard',
            ],
        ];

        foreach ($events as $eventData) {
            Event::create($eventData);
        }

        if ($this->command) {
            $this->command->info('✓ Created ' . count($events) . ' events');
        }
    }
}
