<?php
/**
 * Active Callbacks
 *
 * @package property_dealer
 */

// Theme Options.
function property_dealer_is_pagination_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_enable_pagination' )->value() );
}
function property_dealer_is_breadcrumb_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_enable_breadcrumb' )->value() );
}
function property_dealer_is_layout_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_website_layout' )->value() );
}
function property_dealer_is_pagetitle_bcakground_image_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_page_header_style' )->value() );
}
function property_dealer_is_preloader_style( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_enable_preloader' )->value() );
}

function property_dealer_is_banner_slider_section_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_enable_banner_section' )->value() );
}
function property_dealer_is_banner_slider_section_and_content_type_post_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_banner_slider_content_type' )->value();
	return ( property_dealer_is_banner_slider_section_enabled( $property_dealer_control ) && ( 'post' === $property_dealer_content_type ) );
}
function property_dealer_is_banner_slider_section_and_content_type_page_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_banner_slider_content_type' )->value();
	return ( property_dealer_is_banner_slider_section_enabled( $property_dealer_control ) && ( 'page' === $property_dealer_content_type ) );
}

// Properties section.
function property_dealer_is_post_tab_section_and_content_type_page_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_slider_slider_content_type' )->value();
	return ( property_dealer_is_slider_slider_section_enabled( $property_dealer_control ) && ( 'page' === $property_dealer_content_type ) );
}
function property_dealer_is_post_tab_section_and_content_type_post_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_slider_slider_content_type' )->value();
	return ( property_dealer_is_slider_slider_section_enabled( $property_dealer_control ) && ( 'post' === $property_dealer_content_type ) );
}
function property_dealer_is_properties_section_enabled( $property_dealer_control ) {
	return ( $property_dealer_control->manager->get_setting( 'property_dealer_enable_properties_section' )->value() );
}
function property_dealer_is_properties_section_and_content_type_post_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_properties_content_type' )->value();
	return ( property_dealer_is_properties_section_enabled( $property_dealer_control ) && ( 'post' === $property_dealer_content_type ) );
}
function property_dealer_is_properties_section_and_content_type_page_enabled( $property_dealer_control ) {
	$property_dealer_content_type = $property_dealer_control->manager->get_setting( 'property_dealer_properties_content_type' )->value();
	return ( property_dealer_is_properties_section_enabled( $property_dealer_control ) && ( 'page' === $property_dealer_content_type ) );
}