<?php
namespace UM_Elementor\Helpers;

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

class UM_Editor_Placeholder {

	public static function render( string $title, string $message, string $hint = '' ): void {
		echo '<div class="umep-profile-widget-placeholder">';
		echo '<strong>' . esc_html( $title ) . '</strong>';
		echo '<p class="umep-profile-body-empty">' . esc_html( $message ) . '</p>';
		if ( '' !== $hint ) {
			echo '<p class="umep-profile-body-empty"><small>' . esc_html( $hint ) . '</small></p>';
		}
		echo '</div>';
	}

	/**
	 * Dark canvas bar for Elementor editor preview (matches UM widget preview notices).
	 */
	public static function canvas_notice_html( string $title, string $message ): string {
		$style = 'background:#1d2939;color:#93c5fd;font-size:11px;font-family:monospace;'
			. 'padding:6px 12px;border-radius:4px;margin-bottom:8px;border-left:3px solid #3b82f6;';

		return '<div class="umep-editor-preview-notice umep-editor-shortcode-swap-notice" style="' . esc_attr( $style ) . '">'
			. '<strong style="color:#e2e8f0;">' . esc_html( $title ) . '</strong><br>'
			. esc_html( $message )
			. '</div>';
	}
}
