<?php
namespace Dormatic\Helper\Elementor;

use Elementor\Plugin;

class Element {

	public function __construct() {
		add_action( 'elementor/elements/categories_registered', array( $this, 'add_elementor_widget_categories' ) );
		add_action( 'elementor/widgets/register', array( $this, 'widgets_registered' ) );
	}

	public function widgets_registered() {
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Banner_Slider() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Feature() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_About_Section() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_About_Two() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Servces() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Servces_Two() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Why_Choose_Us() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Blog() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Installation_Section() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Projects() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Team() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Pricing() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Funfact() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Testimonial() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_CTA() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_CTA_Two() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Clients() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Works() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Appointment_Section() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Contact_Info() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Contact_Section() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Contact_Info_Two() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Service_Thumb_With_Title() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Service_Items() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Service_Projects() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Service_Form() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Newslatter_Form() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Footer_Logo() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Footer_Links() );
		 Plugin::instance()->widgets_manager->register( new Widgets\Dormatic_Footer_Contact() );
	}
	
	function add_elementor_widget_categories( $elements_manager ) {
		$elements_manager->add_category(
			'Dormatic',
			array(
				'title' => __( 'Dormatic', 'dormatic-core' ),
				'icon'  => 'fa fa-plug',
			)
		);
	}
}
