<?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_contents', function (Blueprint $table) {
            $table->id();

            // About section
            $table->string('about_image1')->nullable();
            $table->string('about_image2')->nullable();
            $table->string('about_title_en')->nullable();
            $table->string('about_title_ar')->nullable();
            $table->longText('about_description_en')->nullable();
            $table->longText('about_description_ar')->nullable();

            // News section
            $table->longText('news_description_en')->nullable();
            $table->longText('news_description_ar')->nullable();

            // Contact section
            $table->longText('contact_description_en')->nullable();
            $table->longText('contact_description_ar')->nullable();

            // Why choose us
            $table->string('why_choose_us_title_en')->nullable();
            $table->string('why_choose_us_title_ar')->nullable();
            $table->longText('why_choose_us_description_en')->nullable();
            $table->longText('why_choose_us_description_ar')->nullable();
            $table->string('why_choose_us_image1')->nullable();
            $table->string('why_choose_us_image2')->nullable();

            // Items (array of title + description)
            $table->json('why_choose_us_items_en')->nullable();
            $table->json('why_choose_us_items_ar')->nullable();

            // Follow us
            $table->longText('follow_us_en')->nullable();
            $table->longText('follow_us_ar')->nullable();

            $table->timestamps();
        });
    }

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