<?php

/**
 * Active Callbacks
 *
 * @package burger_joint
 */

// Theme Options.
function burger_joint_is_pagination_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_enable_pagination' )->value() );
}
function burger_joint_is_breadcrumb_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_enable_breadcrumb' )->value() );
}
function burger_joint_is_layout_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_website_layout' )->value() );
}
function burger_joint_is_pagetitle_bcakground_image_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_page_header_style' )->value() );
}
function burger_joint_is_preloader_style( $burger_joint_control ) {
	return ( $burger_joint_control->manager->get_setting( 'burger_joint_enable_preloader' )->value() );
}

// Header Options.
function burger_joint_is_topbar_enabled( $control ) {
	return ( $control->manager->get_Setting( 'burger_joint_enable_topbar' )->value() );
}

// Banner Slider Section.
function burger_joint_is_banner_slider_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_enable_banner_section' )->value() );
}
function burger_joint_is_banner_slider_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'burger_joint_banner_slider_content_type' )->value();
	return ( burger_joint_is_banner_slider_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function burger_joint_is_banner_slider_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'burger_joint_banner_slider_content_type' )->value();
	return ( burger_joint_is_banner_slider_section_enabled( $control ) && ( 'page' === $content_type ) );
}

//About section.
function burger_joint_is_about_section_enabled( $control ) {
	return ( $control->manager->get_setting( 'burger_joint_enable_about_section' )->value() );
}
function burger_joint_is_about_section_and_content_type_post_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'burger_joint_about_content_type' )->value();
	return ( burger_joint_is_about_section_enabled( $control ) && ( 'post' === $content_type ) );
}
function burger_joint_is_about_section_and_content_type_page_enabled( $control ) {
	$content_type = $control->manager->get_setting( 'burger_joint_about_content_type' )->value();
	return ( burger_joint_is_about_section_enabled( $control ) && ( 'page' === $content_type ) );
}