<?php

namespace RadiusTheme\RadiusBooking\ExportImport\Contracts;

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

/**
 * Interface ImporterInterface
 *
 * All module importers must implement this interface.
 *
 * @package RadiusTheme\RadiusBooking\ExportImport\Contracts
 */
interface ImporterInterface {

	/**
	 * Get the module name matching the export key.
	 *
	 * @return string
	 */
	public function getModuleName(): string;

	/**
	 * Import a batch of records.
	 *
	 * @param array    $records  Array of record data to import.
	 * @param IdMapper $idMapper ID mapping instance for FK remapping.
	 *
	 * @return int Number of records imported.
	 */
	public function import( array $records, \RadiusTheme\RadiusBooking\ExportImport\IdMapper $idMapper ): int;

	/**
	 * Get module names that must be imported before this one.
	 *
	 * @return array
	 */
	public function getDependencies(): array;
}
