<?php
/**
 * Answyr — Surface module base.
 *
 * A "module" is a built-in surface (Desk, Chat). Modules are toggleable in
 * settings but ship inside the one plugin — they are NOT separate add-on
 * plugins. Each registers its own hooks, REST routes, and admin screens.
 *
 * @package Answyr
 */

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

abstract class Answyr_Module {

	/** Stable module id, e.g. "desk". */
	abstract public function id(): string;

	/** Human label. */
	abstract public function label(): string;

	/** Wire up hooks / routes / screens. Called once on boot if enabled. */
	abstract public function register(): void;

	/** Shared AI client for the module's grounding + drafting. */
	protected function ai(): Answyr_AI_Client {
		return new Answyr_AI_Client();
	}
}
