<?php
namespace ElementPack\Modules\PortfolioGallery\Skins;

use Elementor\Skin_Base as Elementor_Skin_Base;

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

class Skin_Abetis extends Elementor_Skin_Base {
	public function get_id() {
		return 'bdt-abetis';
	}

	public function get_title() {
		return esc_html__( 'Abetis', 'bdthemes-element-pack' );
	}

	public function render() {
		$settings = $this->parent->get_settings_for_display();

		$this->parent->query_posts( $settings['posts_per_page'] );
		$wp_query = $this->parent->get_query();
		if ( ! $wp_query->found_posts ) {
			return;
		}

		$this->parent->render_header( 'abetis', $settings );

		while ( $wp_query->have_posts() ) {
			$wp_query->the_post();
			$this->parent->render_post( $settings );
		}

		$this->parent->render_footer();

		if ( 'yes' === $settings['show_pagination'] ) {
			?>
			<div class="ep-pagination">
				<?php element_pack_post_pagination( $wp_query ); ?>
			</div>
			<?php
		}

		wp_reset_postdata();
	}
}

