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

// Theme Options.
function electrical_repair_is_pagination_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_enable_pagination' )->value() );
}
function electrical_repair_is_breadcrumb_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_enable_breadcrumb' )->value() );
}
function electrical_repair_is_layout_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_website_layout' )->value() );
}
function electrical_repair_is_pagetitle_bcakground_image_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_page_header_style' )->value() );
}
function electrical_repair_is_preloader_style( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_enable_preloader' )->value() );
}

// Banner Slider Section.
function electrical_repair_is_banner_slider_section_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_enable_banner_section' )->value() );
}
function electrical_repair_is_banner_slider_section_and_content_type_post_enabled( $electrical_repair_control ) {
	$content_type = $electrical_repair_control->manager->get_setting( 'electrical_repair_banner_slider_content_type' )->value();
	return ( electrical_repair_is_banner_slider_section_enabled( $electrical_repair_control ) && ( 'post' === $content_type ) );
}
function electrical_repair_is_banner_slider_section_and_content_type_page_enabled( $electrical_repair_control ) {
	$content_type = $electrical_repair_control->manager->get_setting( 'electrical_repair_banner_slider_content_type' )->value();
	return ( electrical_repair_is_banner_slider_section_enabled( $electrical_repair_control ) && ( 'page' === $content_type ) );
}

// Product Section.
function electrical_repair_is_product_section_enabled( $electrical_repair_control ) {
	return ( $electrical_repair_control->manager->get_setting( 'electrical_repair_enable_product_section' )->value() );
}