<?php

/**
 * Active Callbacks
 *
 * @package bakery_confectionery
 */

// Theme Options.
function bakery_confectionery_is_pagination_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_enable_pagination' )->value() );
}
function bakery_confectionery_is_breadcrumb_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_enable_breadcrumb' )->value() );
}
function bakery_confectionery_is_layout_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_website_layout' )->value() );
}
function bakery_confectionery_is_pagetitle_bcakground_image_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_page_header_style' )->value() );
}
function bakery_confectionery_is_preloader_style( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_enable_preloader' )->value() );
}

// Header Options.
function bakery_confectionery_is_topbar_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_Setting( 'bakery_confectionery_enable_topbar' )->value() );
}

// Banner Slider Section.
function bakery_confectionery_is_banner_slider_section_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_enable_banner_section' )->value() );
}
function bakery_confectionery_is_banner_slider_section_and_content_type_post_enabled( $bakery_confectionery_control ) {
	$bakery_confectionery_content_type = $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_banner_slider_content_type' )->value();
	return ( bakery_confectionery_is_banner_slider_section_enabled( $bakery_confectionery_control ) && ( 'post' === $bakery_confectionery_content_type ) );
}
function bakery_confectionery_is_banner_slider_section_and_content_type_page_enabled( $bakery_confectionery_control ) {
	$bakery_confectionery_content_type = $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_banner_slider_content_type' )->value();
	return ( bakery_confectionery_is_banner_slider_section_enabled( $bakery_confectionery_control ) && ( 'page' === $bakery_confectionery_content_type ) );
}

// Places section.
function bakery_confectionery_is_product_section_enabled( $bakery_confectionery_control ) {
	return ( $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_enable_service_section' )->value() );
}
function bakery_confectionery_is_product_section_and_content_type_post_enabled( $bakery_confectionery_control ) {
	$bakery_confectionery_content_type = $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_product_content_type' )->value();
	return ( bakery_confectionery_is_product_section_enabled( $bakery_confectionery_control ) && ( 'post' === $bakery_confectionery_content_type ) );
}
function bakery_confectionery_is_product_section_and_content_type_page_enabled( $bakery_confectionery_control ) {
	$bakery_confectionery_content_type = $bakery_confectionery_control->manager->get_setting( 'bakery_confectionery_product_content_type' )->value();
	return ( bakery_confectionery_is_product_section_enabled( $bakery_confectionery_control ) && ( 'page' === $bakery_confectionery_content_type ) );
}