<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('hero_slides', function (Blueprint $table) {
            $table->string('media_type')->default('image')->after('description');
            $table->string('video_url')->nullable()->after('image');
            $table->string('mobile_image')->nullable()->after('video_url');
            $table->string('button_text')->nullable()->after('mobile_image');
            $table->string('button_url')->nullable()->after('button_text');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('hero_slides', function (Blueprint $table) {
            $table->dropColumn(['media_type', 'video_url', 'mobile_image', 'button_text', 'button_url']);
        });
    }
};
