<?php

namespace SugarCalendarBookings\Integrations;

/**
 * Integration interface.
 *
 * Contract for all third-party integrations that appear on the Integrations settings page.
 * Each integration registers itself into the IntegrationRegistry and provides
 * its own sidebar nav item data and content panel rendering.
 *
 * @since 1.4.0
 */
interface IntegrationInterface {

	/**
	 * Get the integration slug used in URL parameters.
	 *
	 * @since 1.4.0
	 *
	 * @return string
	 */
	public function get_slug(): string;

	/**
	 * Get the integration display name.
	 *
	 * @since 1.4.0
	 *
	 * @return string
	 */
	public function get_name(): string;

	/**
	 * Get the URL to the integration icon (40x40).
	 *
	 * @since 1.4.0
	 *
	 * @return string
	 */
	public function get_icon_url(): string;

	/**
	 * Get the integration description shown in the content panel.
	 *
	 * @since 1.4.0
	 *
	 * @return string
	 */
	public function get_description(): string;

	/**
	 * Get the integration connection status.
	 *
	 * @since 1.4.0
	 *
	 * @return string One of 'connected', 'not_connected', 'error', 'disabled_by_admin'.
	 */
	public function get_status(): string;

	/**
	 * Check if the integration is enabled.
	 *
	 * @since 1.4.0
	 *
	 * @return bool
	 */
	public function is_enabled(): bool;

	/**
	 * Render the content panel for this integration.
	 *
	 * @since 1.4.0
	 *
	 * @return void
	 */
	public function render_content(): void;

	/**
	 * Get the post data processing rules for this integration's settings.
	 *
	 * @since 1.4.0
	 *
	 * @return array
	 */
	public function get_post_data_processing_rules();
}
