<?php
/**
 * Bricks Signup Element.
 *
 * @package automation-web-platform
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * WAWP Signup Element class.
 */
class WAWP_Bricks_Signup_Element extends \Bricks\Element {
	/**
	 * Element name.
	 *
	 * @var string
	 */
	public $name = 'my-wawp-signup';

	/**
	 * Category.
	 *
	 * @var string
	 */
	public $category = 'general';

	/**
	 * Icon.
	 *
	 * @var string
	 */
	public $icon = 'ti-user';

	/**
	 * CSS Selector.
	 *
	 * @var string
	 */
	public $css_selector = '.my-wawp-signup-wrapper';

	/**
	 * Get label.
	 *
	 * @return string
	 */
	public function get_label() {
		return esc_html__( 'Wawp Signup', 'automation-web-platform' );
	}

	/**
	 * Set control groups.
	 */
	public function set_control_groups() {}

	/**
	 * Set controls.
	 */
	public function set_controls() {}

	/**
	 * Render element.
	 */
	public function render() {
		$this->set_attribute( '_root', 'class', 'my-wawp-signup-wrapper' );
		echo '<div ' . wp_kses_data( $this->render_attributes( '_root' ) ) . '>';
		echo do_shortcode( '[wawp_signup_form]' );
		echo '</div>';
	}
}
