<?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('home_page_settings', function (Blueprint $table) {
            $table->id();
            $table->string('section')->unique(); // about, products, contact, promise
            $table->text('title_en')->nullable();
            $table->text('title_km')->nullable();
            $table->longText('description_en')->nullable();
            $table->longText('description_km')->nullable();
            $table->string('image')->nullable();
            $table->json('highlights')->nullable(); // for about section
            $table->integer('display_limit')->nullable(); // for products section
            $table->string('status')->default('active'); // active, inactive
            $table->integer('order')->default(0);
            $table->timestamps();
        });
    }

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