<?php

namespace Webnestors\Wsn\Snippets;

class ThankyouSurvey extends \Webnestors\Wsn\Snippet {
    public $shortcode = "";

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

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

    public function title() : string {
        return esc_html__( "Place a Survey in Thank you Page", "enhancements-for-woocommerce" );
    }

    public function description() : string {
        return esc_html__( "Place a survey form in the Thank you page. You will need a shortcode from a form builder plugin, for example Fluent Forms or Elementor form widget", "enhancements-for-woocommerce" );
    }

    public function meta() : array {
        return [[
            "label" => esc_html__( "Form Shortcode", "enhancements-for-woocommerce" ),
            "name"  => "shortcode",
            "type"  => "text",
        ]];
    }

    public function tooltip() : ?string {
        ob_start();
        ?>
        <h1><strong><?php 
        echo esc_html( $this->title() );
        ?></strong></h1>
        <h3>Description</h3>
        <p>The Place a Survey in Thank You Page module allows you to embed a survey form directly on the WooCommerce Thank You page, providing a unique opportunity to gather feedback from customers immediately after their purchase. This feature utilizes a shortcode from a compatible form builder plugin, such as Fluent Forms or an Elementor form widget, enabling you to create customized surveys that can capture valuable insights about the shopping experience, product satisfaction, and customer preferences.</p>
        <p>By incorporating a survey on the Thank You page, you can enhance customer engagement, gather important data for improving services, and foster a sense of community by making customers feel valued and heard.</p>
        <h3>Settings</h3>
        <p>Place here the shortcode that was created with the form builder plugin</p>
        <h3>Appearance</h3>
        <p>The are no appearence options for this module</p>
        <h3>Tip</h3>
        <p>You can place any shortcode that you like even if it's not a form, like a template from Elementor</p>
        <?php 
        return ob_get_clean();
    }

    public function run() {
    }

    function wn_thankyou_page_survey() {
    }

}
