<?php
/**
 * Pawfect Body Classes
 *
 * Adds custom body classes for various theme features.
 *
 * @package Pawfect
 * @since 1.0.0
 */

// Exit if accessed directly.
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Add body class for My Account page
 *
 * @param array $classes Body classes array.
 * @return array Modified body classes.
 */
function pawfect_my_account_body_class($classes) {
    if (class_exists('WooCommerce') && is_account_page()) {
        $classes[] = 'pawfect-my-account-page';
    }
    return $classes;
}
add_filter('body_class', 'pawfect_my_account_body_class');

/**
 * Add body class when topbar is enabled
 *
 * @param array $classes Body classes array.
 * @return array Modified body classes.
 */
function pawfect_topbar_body_class($classes) {
    if (get_theme_mod('pawfect_topbar_enable', true)) {
        $classes[] = 'pawfect-has-topbar';
    }
    return $classes;
}
add_filter('body_class', 'pawfect_topbar_body_class');

/**
 * Add body class when animations are disabled
 *
 * @param array $classes Body classes array.
 * @return array Modified body classes.
 */
function pawfect_animations_body_class($classes) {
    if (!get_theme_mod('pawfect_animation_disabled', true)) {
        $classes[] = 'pawfect-animations-disabled';
    }
    return $classes;
}
add_filter('body_class', 'pawfect_animations_body_class');
