<?php
/**
 * Abstract base for settings-page tabs split out per QUALITY-IMPROVEMENT-PLAN.md §T2-2.
 *
 * Each concrete tab lives at `includes/Admin/Settings/Tabs/{Name}Tab.php`.
 *
 * Lifecycle:
 *  - getKey()   — URL slug (e.g. "appearance"). Must match what the nav-tab
 *                 dispatcher looks for.
 *  - getLabel() — Display label for the nav tab.
 *  - register() — Hook the tab's settings sections + fields + custom save
 *                 handlers. Called from `AdminSettings::registerSettings`.
 *  - render()   — Output the tab body. Called from `AdminSettings::renderPage`
 *                 when this tab is active.
 *
 * Tabs that need to contribute to the central `sanitize()` callback expose
 * a public `sanitize(array $input, array $clean): array` static; the
 * orchestrator wires them in. Keeping sanitize centralized matches WP's
 * `register_setting` contract (one sanitize callback per option).
 *
 * @package ThemeREX\AutoDealer\Admin\Settings
 */

declare(strict_types=1);

namespace ThemeREX\AutoDealer\Admin\Settings;

defined( 'ABSPATH' ) || exit;

abstract class AbstractSettingsTab {

	abstract public function getKey(): string;

	abstract public function getLabel(): string;

	/**
	 * Whether this tab is Pro-only (gets the "Pro" badge in the nav). Default false.
	 */
	public function isProBadge(): bool {
		return false;
	}

	abstract public function register(): void;

	abstract public function render(): void;
}
