<?php

/**
 * Active Callbacks
 *
 * @package auto_mechanic
 */

// Theme Options.
function auto_mechanic_is_pagination_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_enable_pagination' )->value() );
}
function auto_mechanic_is_breadcrumb_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_enable_breadcrumb' )->value() );
}
function auto_mechanic_is_layout_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_website_layout' )->value() );
}
function auto_mechanic_is_pagetitle_bcakground_image_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_page_header_style' )->value() );
}
function auto_mechanic_is_preloader_style( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_enable_preloader' )->value() );
}

// Header Options.
function auto_mechanic_is_topbar_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_Setting( 'auto_mechanic_enable_topbar' )->value() );
}

// Banner Slider Section.
function auto_mechanic_is_banner_slider_section_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_enable_banner_section' )->value() );
}
function auto_mechanic_is_banner_slider_section_and_content_type_post_enabled( $auto_mechanic_control ) {
	$auto_mechanic_content_type = $auto_mechanic_control->manager->get_setting( 'auto_mechanic_banner_slider_content_type' )->value();
	return ( auto_mechanic_is_banner_slider_section_enabled( $auto_mechanic_control ) && ( 'post' === $auto_mechanic_content_type ) );
}
function auto_mechanic_is_banner_slider_section_and_content_type_page_enabled( $auto_mechanic_control ) {
	$auto_mechanic_content_type = $auto_mechanic_control->manager->get_setting( 'auto_mechanic_banner_slider_content_type' )->value();
	return ( auto_mechanic_is_banner_slider_section_enabled( $auto_mechanic_control ) && ( 'page' === $auto_mechanic_content_type ) );
}

// Car Services section.
function auto_mechanic_is_services_section_enabled( $auto_mechanic_control ) {
	return ( $auto_mechanic_control->manager->get_setting( 'auto_mechanic_enable_services_section' )->value() );
}