<?php

namespace Lknwp\CrowdfundingExtension\Includes;

final class LknwpCrowdfundingExtensionHelper
{
    /**
       * Show plugin dependency notice
       *
       * @since
       */
    final public static function dependency_notice(): void
    {
        // Admin notice.
        $message = sprintf(
            '<div class="notice notice-error"><p><strong>%1$s</strong> %2$s <a href="%3$s" target="_blank">%4$s</a>  %5$s %6$s+ %7$s.</div>',
            'Erro de ativação:',
            'Você precisa ter o',
            'https://br.wordpress.org/plugins/wp-crowdfunding/',
            'WP CROWDFUNDING',
            'instalado e ativo na versão mínima',
            LKNWP_CROWDFUNDING_EXTENSION_MIN_CROWDFUNDING_VERSION,
            'para o plugin de Extensão do WP CROWDFUNDING ativar.'
        );

        echo wp_kses_post($message);
    }

    final public static function get_messages()
    {
        return [
            "loading" => __('Loading...', 'link-nacional-wp-crowdfunding-extension'),
            "load" => __('Load more', 'link-nacional-wp-crowdfunding-extension'),
            "noMore" => __('No More Campaigns', 'link-nacional-wp-crowdfunding-extension'),
            "error" => __('Error, Try Again', 'link-nacional-wp-crowdfunding-extension')
        ];
    }

    final public static function get_translations()
    {
        return [
            'errorMessage' => __('An error occurred. Please try again. Error: ', 'link-nacional-wp-crowdfunding-extension'),
            'custom_amount_error' => __('Please enter a valid amount.', 'link-nacional-wp-crowdfunding-extension'),
            'confirmation_message' => __('By continuing, your cart will be emptied. Do you want to proceed?', 'link-nacional-wp-crowdfunding-extension'),
            'add_to_cart_error' => __('Error adding the amount to the cart.', 'link-nacional-wp-crowdfunding-extension'),
            'general_error' => __('An error occurred. Please try again.', 'link-nacional-wp-crowdfunding-extension'),
            'product_id_error' => __('Product ID not found.', 'link-nacional-wp-crowdfunding-extension'),
        ];
    }
}
