<?php

/**
 * Active Callbacks
 *
 * @package construction_engineer
 */

// Theme Options.
function construction_engineer_is_pagination_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_enable_pagination' )->value() );
}
function construction_engineer_is_breadcrumb_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_enable_breadcrumb' )->value() );
}
function construction_engineer_is_layout_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_website_layout' )->value() );
}
function construction_engineer_is_pagetitle_bcakground_image_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_page_header_style' )->value() );
}
function construction_engineer_is_preloader_style( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_enable_preloader' )->value() );
}

// Header Options.
function construction_engineer_is_topbar_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_Setting( 'construction_engineer_enable_topbar' )->value() );
}

// Banner Slider Section.
function construction_engineer_is_banner_slider_section_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_enable_banner_section' )->value() );
}
function construction_engineer_is_banner_slider_section_and_content_type_post_enabled( $construction_engineer_control ) {
	$construction_engineer_content_type = $construction_engineer_control->manager->get_setting( 'construction_engineer_banner_slider_content_type' )->value();
	return ( construction_engineer_is_banner_slider_section_enabled( $construction_engineer_control ) && ( 'post' === $construction_engineer_content_type ) );
}
function construction_engineer_is_banner_slider_section_and_content_type_page_enabled( $construction_engineer_control ) {
	$construction_engineer_content_type = $construction_engineer_control->manager->get_setting( 'construction_engineer_banner_slider_content_type' )->value();
	return ( construction_engineer_is_banner_slider_section_enabled( $construction_engineer_control ) && ( 'page' === $construction_engineer_content_type ) );
}

//About Us Section.
function construction_engineer_is_service_section_enabled( $construction_engineer_control ) {
	return ( $construction_engineer_control->manager->get_setting( 'construction_engineer_enable_service_section' )->value() );
}
function construction_engineer_is_service_section_and_content_type_post_enabled( $construction_engineer_control ) {
	$construction_engineer_content_type = $construction_engineer_control->manager->get_setting( 'construction_engineer_service_content_type' )->value();
	return ( construction_engineer_is_service_section_enabled( $construction_engineer_control ) && ( 'post' === $construction_engineer_content_type ) );
}
function construction_engineer_is_service_section_and_content_type_page_enabled( $construction_engineer_control ) {
	$construction_engineer_content_type = $construction_engineer_control->manager->get_setting( 'construction_engineer_service_content_type' )->value();
	return ( construction_engineer_is_service_section_enabled( $construction_engineer_control ) && ( 'page' === $construction_engineer_content_type ) );
}