<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('banners', function (Blueprint $table) {
            // Images (max 3) - on conserve `image_url` comme première image pour compatibilité.
            $table->string('image_url_2')->nullable()->after('image_url');
            $table->string('image_url_3')->nullable()->after('image_url_2');

            // WhatsApp
            $table->string('whatsapp_number', 32)->nullable()->after('cta_target');
            $table->text('whatsapp_message')->nullable()->after('whatsapp_number');
        });
    }

    public function down(): void
    {
        Schema::table('banners', function (Blueprint $table) {
            $table->dropColumn(['image_url_2', 'image_url_3', 'whatsapp_number', 'whatsapp_message']);
        });
    }
};

