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

declare(strict_types=1);

namespace BookiFlex\Core\Contract;

use BookiFlex\Core\Model\AccommodationType\Accommodation\AccommodationType;
use BookiFlex\Core\Model\AccommodationType\Scheme\AllocationScheme;
use BookiFlex\Core\ValueObject\GuestConfiguration;

defined( 'ABSPATH' ) || exit;

/**
 * Service for creating and validating placement schemes
 */
interface AllocationServiceInterface
{
    /**
     * Check if accommodation can fit the guests
     */
    public function canAccommodate(
        AccommodationType $accommodation,
        GuestConfiguration $guestConfiguration,
    ): bool;

    /**
     * Create placement scheme for given guests
     */
    public function createScheme(
        AccommodationType $accommodation,
        GuestConfiguration $guestConfiguration,
    ): AllocationScheme;
}
