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

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

/**
 * WAWP Login Element -> [wawp_otp_login]
 */
class WAWP_Bricks_Login_Element extends \Bricks\Element {
	/**
	 * Element name.
	 *
	 * @var string
	 */
	public $name = 'my-wawp-login';

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

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

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

	/**
	 * Get label.
	 *
	 * @return string
	 */
	public function get_label() {
		return esc_html__( 'Wawp Login', '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-login-wrapper' );
		echo '<div ' . wp_kses_data( $this->render_attributes( '_root' ) ) . '>';
		echo do_shortcode( '[wawp_otp_login]' );
		echo '</div>';
	}
}
