<?php

namespace WeDevs\AppBridge\Core\Contracts;

interface IntegrationInterface {

	/**
	 * Whether the parent plugin required by this integration is active.
	 *
	 * @return bool
	 */
	public static function is_active(): bool;

	/**
	 * Always-loaded Hookable instances for this integration.
	 *
	 * @return Hookable[]
	 */
	public function hookables(): array;

	/**
	 * Conditionally-loaded Hookable instances (e.g. dependent on optional plugins).
	 *
	 * @return Hookable[]
	 */
	public function conditional_hookables(): array;

	/**
	 * REST controller instances for this integration.
	 *
	 * @return object[]
	 */
	public function rest_controllers(): array;

	/**
	 * Admin submenus declared by this integration.
	 *
	 * Each entry: ['label' => string, 'slug' => string, 'mount_id' => string]
	 *
	 * @return array<array{label: string, slug: string, mount_id: string}>
	 */
	public function menus(): array;

	/**
	 * Push-notification event catalogs owned by this integration.
	 *
	 * Each integration that targets a mobile app contributes the catalog for
	 * that app, keyed by app name (e.g. `customer`, `vendor`). Each value is
	 * the category-grouped event list (same shape consumed by SettingsSchema).
	 *
	 * @return array<string, array<string, array{label:string, description?:string, events:array<int, array<string, mixed>>}>>
	 */
	public function event_catalogs(): array;

	/**
	 * Map of wp_option keys that hold per-event toggle / title / body overrides
	 * for each app this integration owns. Keyed by app name (matching
	 * `event_catalogs()`), with the option name as the value.
	 *
	 * Example: `[ 'vendor' => 'app_bridge_vendor_settings' ]`.
	 *
	 * @return array<string, string>
	 */
	public function event_option_keys(): array;
}
