<?php

namespace Database\Seeders;

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

class AmenitySeeder extends Seeder
{
    public function run(): void
    {
        $amenities = [
            ['name' => 'Wi-Fi', 'icon' => 'wifi', 'category' => 'Essentials'],
            ['name' => 'Air conditioning', 'icon' => 'snowflake', 'category' => 'Essentials'],
            ['name' => 'Kitchen', 'icon' => 'cooking-pot', 'category' => 'Features'],
            ['name' => 'Pool', 'icon' => 'waves', 'category' => 'Features'],
            ['name' => 'Free parking', 'icon' => 'car', 'category' => 'Parking'],
            ['name' => 'Workspace', 'icon' => 'laptop', 'category' => 'Features'],
            ['name' => 'Washer', 'icon' => 'washing-machine', 'category' => 'Essentials'],
            ['name' => 'Pet friendly', 'icon' => 'paw-print', 'category' => 'Policies'],
        ];

        foreach ($amenities as $amenity) {
            Amenity::query()->updateOrCreate(['name' => $amenity['name']], $amenity);
        }
    }
}