<?php

namespace App\Repositories\Contracts;

use App\Enums\MenuLocation;
use App\Models\Menu;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;

/**
 * @extends BaseRepositoryInterface<Menu>
 */
interface MenuRepositoryInterface extends BaseRepositoryInterface
{
    /**
     * @param  array<string, mixed>  $filters
     * @return LengthAwarePaginator<int, Menu>
     */
    public function paginate(array $filters = [], int $perPage = 15): LengthAwarePaginator;

    /**
     * @return Collection<int, Menu>
     */
    public function getByLocation(MenuLocation $location): Collection;

    /**
     * @param  array<int, array{id: int, order_index: int, parent_id?: int|null}>  $items
     */
    public function reorder(array $items): void;
}
