<?php
/**
 * BookiFlex Simple Quota Extension
 *
 * @package    BookiFlex
 * @subpackage SimpleQuota
 * @author     BookiFlex
 * @copyright  Copyright (c) 2025 BookiFlex
 * @license    GPL-2.0-or-later
 *
 * @link       https://bookiflex.com
 */


declare(strict_types=1);
namespace BookiFlex\Extensions\SimpleQuota;

use BookiFlex\Core\Contract\AvailabilityChecker\QuotaAvailabilityInterface;
use BookiFlex\Core\Repository\AccommodationTypeRepository;
use BookiFlex\Core\Repository\ReservationRepository;
use BookiFlex\Extensions\SimpleQuota\Service\QuotaAvailability;
use Pimple\Container;
use Pimple\ServiceProviderInterface;

defined( 'ABSPATH' ) || exit;

class ServiceProvider implements ServiceProviderInterface
{
    public function register(Container $pimple): void
    {
        $pimple[QuotaAvailabilityInterface::class] = function ($c) {
            return new QuotaAvailability(
                $c->get(AccommodationTypeRepository::class),
                $c->get(ReservationRepository::class)
            );
        };
    }
}
