<?php
/**
 * Active Callbacks
 *
 * @package appointment_management
 */

// Theme Options.
function appointment_management_is_pagination_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_enable_pagination' )->value() );
}
function appointment_management_is_breadcrumb_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_enable_breadcrumb' )->value() );
}
function appointment_management_is_layout_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_website_layout' )->value() );
}
function appointment_management_is_pagetitle_bcakground_image_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_page_header_style' )->value() );
}
function appointment_management_is_preloader_style( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_enable_preloader' )->value() );
}

// Banner Slider Section.
function appointment_management_is_banner_slider_section_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_enable_banner_section' )->value() );
}
function appointment_management_is_banner_slider_section_and_content_type_post_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_banner_slider_content_type' )->value();
	return ( appointment_management_is_banner_slider_section_enabled( $appointment_management_control ) && ( 'post' === $appointment_management_content_type ) );
}
function appointment_management_is_banner_slider_section_and_content_type_page_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_banner_slider_content_type' )->value();
	return ( appointment_management_is_banner_slider_section_enabled( $appointment_management_control ) && ( 'page' === $appointment_management_content_type ) );
}

// Service section.
function appointment_management_is_post_tab_section_and_content_type_page_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_banner_slider_content_type' )->value();
	return ( appointment_management_is_banner_slider_section_enabled( $appointment_management_control ) && ( 'page' === $appointment_management_content_type ) );
}
function appointment_management_is_post_tab_section_and_content_type_post_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_banner_slider_content_type' )->value();
	return ( appointment_management_is_banner_slider_section_enabled( $appointment_management_control ) && ( 'post' === $appointment_management_content_type ) );
}
function appointment_management_is_service_section_enabled( $appointment_management_control ) {
	return ( $appointment_management_control->manager->get_setting( 'appointment_management_enable_service_section' )->value() );
}
function appointment_management_is_service_section_and_content_type_post_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_service_content_type' )->value();
	return ( appointment_management_is_service_section_enabled( $appointment_management_control ) && ( 'post' === $appointment_management_content_type ) );
}
function appointment_management_is_service_section_and_content_type_page_enabled( $appointment_management_control ) {
	$appointment_management_content_type = $appointment_management_control->manager->get_setting( 'appointment_management_service_content_type' )->value();
	return ( appointment_management_is_service_section_enabled( $appointment_management_control ) && ( 'page' === $appointment_management_content_type ) );
}