<?php

namespace RadiusTheme\RadiusBooking\Facades;

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

use RadiusTheme\RadiusBooking\ExportImport\ImportBuilder;

/**
 * Class Import
 *
 * Facade for import operations.
 *
 * Usage:
 *   Import::module('appointment')->import($records);
 *   Import::fromFile('/path/to/export.json')->import();
 *
 * @method static ImportBuilder module(string $module)
 * @method static ImportBuilder fromFile(string $path)
 *
 * @package RadiusTheme\RadiusBooking\Facades
 */
class Import {

	/**
	 * Handle static method calls by delegating to ImportBuilder.
	 *
	 * @param string $method Method name.
	 * @param array  $args   Method arguments.
	 *
	 * @return ImportBuilder
	 */
	public static function __callStatic( string $method, array $args ) {
		$builder = new ImportBuilder();
		return $builder->$method( ...$args );
	}
}
