<?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\Model\DateUnit\Calculator;

use BookiFlex\Core\Model\AccommodationType\Scheme\AllocationScheme;
use BookiFlex\Core\Model\DateUnit\DateUnit;
use BookiFlex\Core\Model\DateUnit\Exception\PriceNotSetByDateException;

defined( 'ABSPATH' ) || exit;

/**
 * Interface for price calculation strategies
 */
interface PriceCalculatorInterface
{
    /**
     * Calculate price for an array of DateUnits
     *
     * @param DateUnit[] $dateUnits Array of DateUnit (already sorted and validated)
     * @param AllocationScheme $allocationScheme Guest allocation scheme
     * @return CalculatedPriceResult
     * @throws PriceNotSetByDateException
     */
    public function calculate(array $dateUnits, AllocationScheme $allocationScheme): CalculatedPriceResult;

    /**
     * Get strategy name
     */
    public function getName(): string;
}
