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

// Theme Options.
function handmade_craft_is_pagination_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_enable_pagination' )->value() );
}
function handmade_craft_is_breadcrumb_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_enable_breadcrumb' )->value() );
}
function handmade_craft_is_layout_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_website_layout' )->value() );
}
function handmade_craft_is_pagetitle_bcakground_image_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_page_header_style' )->value() );
}
function handmade_craft_is_preloader_style( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_enable_preloader' )->value() );
}

// Header Options.
function handmade_craft_is_topbar_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_Setting( 'handmade_craft_enable_topbar' )->value() );
}

// Banner Slider Section.
function handmade_craft_is_banner_slider_section_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_enable_banner_section' )->value() );
}
function handmade_craft_is_banner_slider_section_and_content_type_post_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_banner_slider_content_type' )->value();
	return ( handmade_craft_is_banner_slider_section_enabled( $handmade_craft_control ) && ( 'post' === $handmade_craft_content_type ) );
}
function handmade_craft_is_banner_slider_section_and_content_type_page_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_banner_slider_content_type' )->value();
	return ( handmade_craft_is_banner_slider_section_enabled( $handmade_craft_control ) && ( 'page' === $handmade_craft_content_type ) );
}

// Product section.
function handmade_craft_is_post_tab_section_and_content_type_page_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_banner_slider_content_type' )->value();
	return ( handmade_craft_is_banner_slider_section_enabled( $handmade_craft_control ) && ( 'page' === $handmade_craft_content_type ) );
}
function handmade_craft_is_post_tab_section_and_content_type_post_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_banner_slider_content_type' )->value();
	return ( handmade_craft_is_banner_slider_section_enabled( $handmade_craft_control ) && ( 'post' === $handmade_craft_content_type ) );
}
function handmade_craft_is_product_section_enabled( $handmade_craft_control ) {
	return ( $handmade_craft_control->manager->get_setting( 'handmade_craft_enable_product_section' )->value() );
}
function handmade_craft_is_product_section_and_content_type_post_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_product_content_type' )->value();
	return ( handmade_craft_is_product_section_enabled( $handmade_craft_control ) && ( 'post' === $handmade_craft_content_type ) );
}
function handmade_craft_is_product_section_and_content_type_page_enabled( $handmade_craft_control ) {
	$handmade_craft_content_type = $handmade_craft_control->manager->get_setting( 'handmade_craft_product_content_type' )->value();
	return ( handmade_craft_is_product_section_enabled( $handmade_craft_control ) && ( 'page' === $handmade_craft_content_type ) );
}