<?php

/**
 * Active Callbacks
 *
 * @package cat_groomer
 */

// Theme Options.
function cat_groomer_is_pagination_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_enable_pagination' )->value() );
}
function cat_groomer_is_breadcrumb_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_enable_breadcrumb' )->value() );
}
function cat_groomer_is_layout_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_website_layout' )->value() );
}
function cat_groomer_is_pagetitle_bcakground_image_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_page_header_style' )->value() );
}
function cat_groomer_is_preloader_style( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_enable_preloader' )->value() );
}


// Header Options.
function cat_groomer_is_topbar_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_Setting( 'cat_groomer_enable_topbar' )->value() );
}

// Banner Slider Section.
function cat_groomer_is_banner_slider_section_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_enable_banner_section' )->value() );
}
function cat_groomer_is_banner_slider_section_and_content_type_post_enabled( $cat_groomer_control ) {
	$cat_groomer_content_type = $cat_groomer_control->manager->get_setting( 'cat_groomer_banner_slider_content_type' )->value();
	return ( cat_groomer_is_banner_slider_section_enabled( $cat_groomer_control ) && ( 'post' === $cat_groomer_content_type ) );
}
function cat_groomer_is_banner_slider_section_and_content_type_page_enabled( $cat_groomer_control ) {
	$cat_groomer_content_type = $cat_groomer_control->manager->get_setting( 'cat_groomer_banner_slider_content_type' )->value();
	return ( cat_groomer_is_banner_slider_section_enabled( $cat_groomer_control ) && ( 'page' === $cat_groomer_content_type ) );
}

// Places section.
function cat_groomer_is_product_section_enabled( $cat_groomer_control ) {
	return ( $cat_groomer_control->manager->get_setting( 'cat_groomer_enable_service_section' )->value() );
}
function cat_groomer_is_product_section_and_content_type_post_enabled( $cat_groomer_control ) {
	$cat_groomer_content_type = $cat_groomer_control->manager->get_setting( 'cat_groomer_product_content_type' )->value();
	return ( cat_groomer_is_product_section_enabled( $cat_groomer_control ) && ( 'post' === $cat_groomer_content_type ) );
}
function cat_groomer_is_product_section_and_content_type_page_enabled( $cat_groomer_control ) {
	$cat_groomer_content_type = $cat_groomer_control->manager->get_setting( 'cat_groomer_product_content_type' )->value();
	return ( cat_groomer_is_product_section_enabled( $cat_groomer_control ) && ( 'page' === $cat_groomer_content_type ) );
}