<?php

namespace RadiusTheme\RadiusBooking\ExportImport\Contracts;

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

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

	/**
	 * Get the module name used as JSON key.
	 *
	 * @return string
	 */
	public function getModuleName(): string;

	/**
	 * Get total count of exportable records.
	 *
	 * @return int
	 */
	public function count(): int;

	/**
	 * Export a batch of records.
	 *
	 * @param int $offset Starting offset.
	 * @param int $limit  Number of records per batch.
	 *
	 * @return array Array of record data.
	 */
	public function export( int $offset = 0, int $limit = 500 ): array;

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