<?php

namespace CouponsPlus\App\Coupon\Tree\Sets;

use CouponsPlus\App\Conditions\CartItem;
use CouponsPlus\App\Coupon\Tree\Sets\Abilities\CartItemValueStrategy;

class ActivePriceStrategy implements CartItemValueStrategy
{
    public function getValue(CartItem $cartItem): float
    {
        return $cartItem->getProduct()->get_price('edit');
    }

    /**
     * Might change in the future based on the store settings
     * @inheritDoc
     */
    public function getScale(): ?int
    {
        return 2;
    }
}