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

// Theme Options.
function electrical_services_is_pagination_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_enable_pagination' )->value() );
}
function electrical_services_is_breadcrumb_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_enable_breadcrumb' )->value() );
}
function electrical_services_is_layout_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_website_layout' )->value() );
}
function electrical_services_is_pagetitle_bcakground_image_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_page_header_style' )->value() );
}
function electrical_services_is_preloader_style( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_enable_preloader' )->value() );
}

// Banner Slider Section.
function electrical_services_is_banner_slider_section_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_enable_banner_section' )->value() );
}
function electrical_services_is_banner_slider_section_and_content_type_post_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_banner_slider_content_type' )->value();
	return ( electrical_services_is_banner_slider_section_enabled( $electrical_services_control ) && ( 'post' === $electrical_services_content_type ) );
}
function electrical_services_is_banner_slider_section_and_content_type_page_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_banner_slider_content_type' )->value();
	return ( electrical_services_is_banner_slider_section_enabled( $electrical_services_control ) && ( 'page' === $electrical_services_content_type ) );
}

// Services section.
function electrical_services_is_post_tab_section_and_content_type_page_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_slider_slider_content_type' )->value();
	return ( electrical_services_is_slider_section_enabled( $electrical_services_control ) && ( 'page' === $electrical_services_content_type ) );
}
function electrical_services_is_post_tab_section_and_content_type_post_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_slider_slider_content_type' )->value();
	return ( electrical_services_is_slider_section_enabled( $electrical_services_control ) && ( 'post' === $electrical_services_content_type ) );
}
function electrical_services_is_services_section_enabled( $electrical_services_control ) {
	return ( $electrical_services_control->manager->get_setting( 'electrical_services_enable_services_section' )->value() );
}
function electrical_services_is_services_section_and_content_type_post_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_services_content_type' )->value();
	return ( electrical_services_is_services_section_enabled( $electrical_services_control ) && ( 'post' === $electrical_services_content_type ) );
}
function electrical_services_is_services_section_and_content_type_page_enabled( $electrical_services_control ) {
	$electrical_services_content_type = $electrical_services_control->manager->get_setting( 'electrical_services_services_content_type' )->value();
	return ( electrical_services_is_services_section_enabled( $electrical_services_control ) && ( 'page' === $electrical_services_content_type ) );
}