<?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('map_settings', function (Blueprint $table) {
            $table->id();
            $table->text('mapbox_access_token');
            $table->string('default_map_style', 50)->default('streets-v12');
            $table->json('available_map_styles')->nullable();
            $table->integer('max_zoom')->default(18);
            $table->integer('min_zoom')->default(8);
            $table->decimal('default_lat', 10, 8)->default(31.9539);
            $table->decimal('default_lng', 11, 8)->default(46.2575);
            $table->integer('default_zoom')->default(12);
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }

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