<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\DeliveryZone;

class DeliveryZoneController extends Controller
{
    /**
     * Active delivery zones.
     */
    public function index()
    {
        $zones = DeliveryZone::where('is_active', true)
            ->orderBy('sort_order', 'asc')
            ->orderBy('name_ar', 'asc')
            ->get();

        return response()->json(['data' => $zones]);
    }
}
