<?php

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

/**
 * Adds the logo backdrop control: whether app-logo.tsx draws its white chip
 * behind the tenant's logo. That chip is hardcoded today, which boxes any
 * logo with transparency (or one that is itself white/pale) in an
 * ill-fitting white square regardless of the surrounding theme.
 */
return new class extends Migration
{
    public function up(): void
    {
        Schema::table('tenant_settings', function (Blueprint $table) {
            // 'auto' (default): white chip, matching current behaviour.
            // 'light': always a light chip, even against a dark sidebar.
            // 'none': no chip — the logo sits directly on its surface.
            $table->string('branding_logo_backdrop', 16)->nullable()->after('branding_panel_color');
        });
    }

    public function down(): void
    {
        Schema::table('tenant_settings', function (Blueprint $table) {
            $table->dropColumn('branding_logo_backdrop');
        });
    }
};
