<?php
/**
 * Backward-compatible Vagaro API loader.
 *
 * Some legacy AJAX paths still include this file directly. Keep the public
 * class name available while loading the tier-specific implementation.
 *
 * @package Yatoon
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

$yatoon_vagaro_file = 'pro' === ( defined( 'YATOON_PACKAGE_TIER' ) ? YATOON_PACKAGE_TIER : 'free' )
    ? SBS_PLUGIN_DIR . 'includes/pro/class-yatoon-vagaro-api.php'
    : SBS_PLUGIN_DIR . 'includes/free/class-yatoon-vagaro-api-stub.php';

if ( file_exists( $yatoon_vagaro_file ) ) {
    require_once $yatoon_vagaro_file;
}
