<?php
/**
 * Inline Theme 2 - Minimal.
 *
 * @package Relatedly\Theming\Inline
 * @since   2.0.0
 */

namespace Relatedly\Theming\Inline;

use Relatedly\Theming\AbstractTheme;
defined( 'ABSPATH' ) || exit;

/**
 * Renders the minimal inline theme.
 *
 * @since 2.0.0
 */
class Theme2Minimal extends AbstractTheme {
	/**
	 * Template file name.
	 *
	 * @var string
	 */
	protected string $template_file = 'inline/minimal.php';

	/**
	 * Get the tracking display type.
	 *
	 * @return string
	 */
	protected function display_type(): string {
		return 'inline'; }

	/**
	 * Build template variables.
	 *
	 * @param \WP_Post $post      Post object.
	 * @param int|null $source_id Source post ID.
	 * @return array<string,mixed>
	 */
	protected function template_vars( \WP_Post $post, ?int $source_id ): array {
		$vars             = parent::template_vars( $post, $source_id );
		$vars['css_vars'] = $this->css_vars(
			[
				'--relatedly-bg'          => 'inline_theme2_bg',
				'--relatedly-border'      => 'inline_theme2_border_color',
				'--relatedly-color'       => 'inline_theme2_color',
				'--relatedly-font-size'   => 'inline_theme2_font_size',
				'--relatedly-font-weight' => 'inline_theme2_font_weight',
				'--relatedly-label-color' => 'inline_theme2_label_color',
				'--relatedly-label-size'  => 'inline_theme2_label_size',
			]
		);
		return $vars;
	}
}
