<?php

namespace WeDevs\AppBridge\Core\Contracts;

interface SettingsSchemaInterface {

	/**
	 * The wp_option key used to store settings for this integration.
	 *
	 * @return string
	 */
	public function get_option_key(): string;

	/**
	 * Returns the flat schema array consumed by the plugin-ui Settings component.
	 * Each element is one of: page, section, or field.
	 *
	 * @return array<int, array<string, mixed>>
	 */
	public function get_schema(): array;

	/**
	 * Persist raw request data into the option store.
	 *
	 * @param array<string, mixed> $data Sanitised request payload.
	 *
	 * @return void
	 */
	public function save( array $data ): void;
}
