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

// Theme Options.
function design_studio_is_pagination_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_enable_pagination' )->value() );
}
function design_studio_is_breadcrumb_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_enable_breadcrumb' )->value() );
}
function design_studio_is_layout_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_website_layout' )->value() );
}
function design_studio_is_pagetitle_bcakground_image_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_page_header_style' )->value() );
}
function design_studio_is_preloader_style( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_enable_preloader' )->value() );
}

// Header Options.
function design_studio_is_topbar_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_Setting( 'design_studio_enable_topbar' )->value() );
}

// Banner Slider Section.
function design_studio_is_banner_slider_section_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_enable_banner_section' )->value() );
}
function design_studio_is_banner_slider_section_and_content_type_post_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_banner_slider_content_type' )->value();
	return ( design_studio_is_banner_slider_section_enabled( $design_studio_control ) && ( 'post' === $design_studio_content_type ) );
}
function design_studio_is_banner_slider_section_and_content_type_page_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_banner_slider_content_type' )->value();
	return ( design_studio_is_banner_slider_section_enabled( $design_studio_control ) && ( 'page' === $design_studio_content_type ) );
}

// Services section.
function design_studio_is_post_tab_section_and_content_type_page_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_slider_slider_content_type' )->value();
	return ( design_studio_is_slider_section_enabled( $design_studio_control ) && ( 'page' === $design_studio_content_type ) );
}
function design_studio_is_post_tab_section_and_content_type_post_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_slider_slider_content_type' )->value();
	return ( design_studio_is_slider_section_enabled( $design_studio_control ) && ( 'post' === $design_studio_content_type ) );
}
function design_studio_is_services_section_enabled( $design_studio_control ) {
	return ( $design_studio_control->manager->get_setting( 'design_studio_enable_services_section' )->value() );
}
function design_studio_is_services_section_and_content_type_post_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_services_content_type' )->value();
	return ( design_studio_is_services_section_enabled( $design_studio_control ) && ( 'post' === $design_studio_content_type ) );
}
function design_studio_is_services_section_and_content_type_page_enabled( $design_studio_control ) {
	$design_studio_content_type = $design_studio_control->manager->get_setting( 'design_studio_services_content_type' )->value();
	return ( design_studio_is_services_section_enabled( $design_studio_control ) && ( 'page' === $design_studio_content_type ) );
}