<?php

namespace App\Http\Controllers\Api;

use App\Http\Services\RegionService;
use App\Http\Resources\RegionResource;

class RegionController
{
    public function __construct(
        protected RegionService $regionService
    ) {
    }

    public function index()
    {
        $regions = $this->regionService->getRegions();

        return respond()->ok(data: RegionResource::collection($regions));
    }
}
