<?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::create('dividers', function (Blueprint $table) {
            $table->id();
            $table->string('title')->nullable();
            $table->enum('icon_type', ['none', 'emoji', 'image'])->default('none');
            $table->string('icon')->nullable(); // emoji or icon name
            $table->string('icon_image')->nullable(); // uploaded image path
            $table->string('divider_style')->default('solid'); // solid, dashed, dotted, gradient
            $table->string('divider_color')->default('#e5e7eb'); // gray-200
            $table->integer('divider_height')->default(2); // px
            $table->integer('spacing_top')->default(40); // px
            $table->integer('spacing_bottom')->default(40); // px
            $table->boolean('is_active')->default(true);
            $table->integer('sort_order')->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('dividers');
    }
};
