<?php

namespace Webnestors\Wsn\Snippets;

class GeneralYouSaveAmountCartCheckout extends \Webnestors\Wsn\Snippet {
    public $saved_text = "";

    public function is_pro() : bool {
        return true;
    }

    public function tab() : string {
        return "general";
    }

    public function title() : string {
        return esc_html__( "Display the Amount Saved on Cart and Checkout", "enhancements-for-woocommerce" );
    }

    public function description() : string {
        return esc_html__( "Show on the cart and checkout page the amount that was saved if the customer has added one or more on sale products in their cart.", "enhancements-for-woocommerce" );
    }

    public function meta() : array {
        return [[
            "label" => esc_html__( "Amount Saved Heading", "enhancements-for-woocommerce" ),
            "name"  => "saved_text",
            "type"  => "text",
        ]];
    }

    public function tooltip() : ?string {
        ob_start();
        ?>
        <h1><strong><?php 
        echo esc_html( $this->title() );
        ?></strong></h1>
        <h3>Description</h3>
        <p>The Display the Amount Saved on Cart and Checkout module is a powerful tool that enhances the shopping experience by informing customers of how much they have saved on discounted products. This module automatically calculates and displays the total amount of savings on the cart and checkout pages whenever a customer adds one or more on-sale products to their cart. By showing customers the value of their savings in real-time, this feature can help create a positive shopping experience, increase conversions, and encourage customers to complete their purchase.</p>
        <h3>Settings</h3>
        <h4>Amount Saved Heading</h4>
        <p>You can write here text that will be displayed, for example "You have saved"</p>
        <h3>Appearance</h3>
        <p>You can customize this module using custom css and the class "tr.wn-saved-amount".</p>
        <?php 
        return ob_get_clean();
    }

    public function run() {
    }

    function display_you_save_message() {
    }

}
