<?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('settings', function (Blueprint $table) {
            $table->string('tagline')->nullable()->after('site_name');
            $table->json('social_links')->nullable()->after('footer_text');
            $table->string('header_cta_label')->nullable()->after('social_links');
            $table->string('header_cta_url')->nullable()->after('header_cta_label');
            $table->string('footer_cta_label')->nullable()->after('header_cta_url');
            $table->string('footer_cta_url')->nullable()->after('footer_cta_label');
        });
    }

    public function down(): void
    {
        Schema::table('settings', function (Blueprint $table) {
            $table->dropColumn([
                'tagline',
                'social_links',
                'header_cta_label',
                'header_cta_url',
                'footer_cta_label',
                'footer_cta_url',
            ]);
        });
    }
};
