<?php

namespace CouponsPlus\App\Conditions\Stubs\Conditions;

use CouponsPlus\Original\Collections\Collection;
use CouponsPlus\Original\Characters\StringManager;
use CouponsPlus\App\Coupon\Abilities\DashboardCardData;

class CartTotal implements DashboardCardData
{
    const TYPE = 'CartTotal';

    static public function getName() : string
    {
        return StringManager::create(__('* (Beta)', 'coupons-plus-for-woocommerce'))->replace('*', __('Cart Total', 'coupons-plus-for-woocommerce'))->get();
    }

    static public function getDescription() : string
    {
        return __('The cart total after taxes, shipping, fees and discounts. This is the final amount that the customer must pay.', 'coupons-plus-for-woocommerce').__(' This includes the amount AFTER any coupons+ discounts. For example, if you set a minimum of Cart Total of $100+ and the coupon adds a 10% discount, this will fail because the final amount will be $90. For most use cases it is recommended that you use the Cart Subtotal condition instead.', 'coupons-plus-for-woocommerce') . __(' Use this to add free gifts or shipping discounts after a minimum purchase amount.', 'coupons-plus-for-woocommerce');
        //return 'Uses the subtotal of the whole cart. *DOES NOT* CALCULATE THE TOTAL BASED ON THE FILTERED ITEMS, USE A FILTER FOR THAT.';
    }

    static public function getUseCases(): Collection
    {
        return new Collection([
            __('Apply offers to customers registered in the last 24 hours', 'coupons-plus-for-woocommerce'),
        ]);
    }

    static public function getNotes() : array
    {
        return [];
    }
}
