<?php

/**
 * Active Callbacks
 *
 * @package bike_workshop
 */

// Theme Options.
function bike_workshop_is_pagination_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_enable_pagination' )->value() );
}
function bike_workshop_is_breadcrumb_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_enable_breadcrumb' )->value() );
}
function bike_workshop_is_layout_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_website_layout' )->value() );
}
function bike_workshop_is_pagetitle_bcakground_image_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_page_header_style' )->value() );
}
function bike_workshop_is_preloader_style( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_enable_preloader' )->value() );
}

// Banner Slider Section.
function bike_workshop_is_banner_slider_section_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_enable_banner_section' )->value() );
}
function bike_workshop_is_banner_slider_section_and_content_type_post_enabled( $bike_workshop_control ) {
	$content_type = $bike_workshop_control->manager->get_setting( 'bike_workshop_banner_slider_content_type' )->value();
	return ( bike_workshop_is_banner_slider_section_enabled( $bike_workshop_control ) && ( 'post' === $content_type ) );
}
function bike_workshop_is_banner_slider_section_and_content_type_page_enabled( $bike_workshop_control ) {
	$content_type = $bike_workshop_control->manager->get_setting( 'bike_workshop_banner_slider_content_type' )->value();
	return ( bike_workshop_is_banner_slider_section_enabled( $bike_workshop_control ) && ( 'page' === $content_type ) );
}

// Bike Services section.
function bike_workshop_is_services_section_enabled( $bike_workshop_control ) {
	return ( $bike_workshop_control->manager->get_setting( 'bike_workshop_enable_services_section' )->value() );
}