<?php

/**
 * Active Callbacks
 *
 * @package corporate_solutions
 */

// Theme Options.
function corporate_solutions_is_pagination_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_enable_pagination' )->value() );
}
function corporate_solutions_is_breadcrumb_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_enable_breadcrumb' )->value() );
}
function corporate_solutions_is_layout_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_website_layout' )->value() );
}
function corporate_solutions_is_pagetitle_bcakground_image_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_page_header_style' )->value() );
}
function corporate_solutions_is_preloader_style( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_enable_preloader' )->value() );
}

// Banner Slider Section.
function corporate_solutions_is_banner_slider_section_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_enable_banner_section' )->value() );
}
function corporate_solutions_is_banner_slider_section_and_content_type_post_enabled( $corporate_solutions_control ) {
	$corporate_solutions_content_type = $corporate_solutions_control->manager->get_setting( 'corporate_solutions_banner_slider_content_type' )->value();
	return ( corporate_solutions_is_banner_slider_section_enabled( $corporate_solutions_control ) && ( 'post' === $corporate_solutions_content_type ) );
}
function corporate_solutions_is_banner_slider_section_and_content_type_page_enabled( $corporate_solutions_control ) {
	$corporate_solutions_content_type = $corporate_solutions_control->manager->get_setting( 'corporate_solutions_banner_slider_content_type' )->value();
	return ( corporate_solutions_is_banner_slider_section_enabled( $corporate_solutions_control ) && ( 'page' === $corporate_solutions_content_type ) );
}

//Services section.
function corporate_solutions_is_service_section_enabled( $corporate_solutions_control ) {
	return ( $corporate_solutions_control->manager->get_setting( 'corporate_solutions_enable_service_section' )->value() );
}
function corporate_solutions_is_service_section_and_content_type_post_enabled( $corporate_solutions_control ) {
	$corporate_solutions_content_type = $corporate_solutions_control->manager->get_setting( 'corporate_solutions_service_content_type' )->value();
	return ( corporate_solutions_is_service_section_enabled( $corporate_solutions_control ) && ( 'post' === $corporate_solutions_content_type ) );
}
function corporate_solutions_is_service_section_and_content_type_page_enabled( $corporate_solutions_control ) {
	$corporate_solutions_content_type = $corporate_solutions_control->manager->get_setting( 'corporate_solutions_service_content_type' )->value();
	return ( corporate_solutions_is_service_section_enabled( $corporate_solutions_control ) && ( 'page' === $corporate_solutions_content_type ) );
}