<?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;

defined( 'ABSPATH' ) || exit;

interface InheritancePriceRulesInterface
{
    /**
     * Return modifiers for inheritance of price
     *
     * Returns an associative array where each key is a placement type,
     * and the value is an array containing modifier details.
     *
     * @return array<string, array{
     *     placementType: string,
     *     type: string,
     *     adjustment: string|null,
     *     value: int|string
     * }>
     *
     * Array structure:
     * [
     *     'placementType' => [
     *         'placementType' => string,       // One of: adultOnMainPlace, adultOnExtraPlace,
     *                                          //         childOnMainPlace, childOnExtraPlace, childWithoutPlace
     *         'type'          => string,       // Calculator type: 'formula', 'percentage', or 'fixed'
     *         'adjustment'    => string|null,  // Adjustment type: 'discount', 'addition', or null (for formula)
     *         'value'         => int|string    // Numeric value (for percentage/fixed) or formula string
     *     ],
     *     ...
     * ]
     *
     * Example:
     * [
     *     'adultOnMainPlace' => [
     *         'placementType' => 'adultOnMainPlace',
     *         'type'          => 'formula',
     *         'adjustment'    => null,
     *         'value'         => 'rate + 500 * beds'
     *     ],
     *     'adultOnExtraPlace' => [
     *         'placementType' => 'adultOnExtraPlace',
     *         'type'          => 'percentage',
     *         'adjustment'    => 'addition',
     *         'value'         => 10
     *     ]
     * ]
     */
    public function getModifiers(): array;
}
