* * * The underlying icon paths live in {@see Icons} so a single source of truth * is preserved. * * @package AdminEase */ namespace AdminEase; defined( 'ABSPATH' ) || exit; /** * Class UiIcons * * Static facade returning inline Lucide SVG markup with a stable signature * matching the design-system reference implementation. */ class UiIcons { /** * Return the named icon's markup, or empty string if unknown. * * @param string $name Icon name (see {@see Icons::paths()} keys). * @param string $class Optional CSS class added to the . * * @return string Complete HTML, or empty string when the icon is unknown. */ public static function get( string $name, string $class = '' ): string { $attributes = []; if ( '' !== $class ) { $attributes['class'] = $class; } return Icons::lucide( $name, $attributes ); } /** * Echo the named icon. Convenience wrapper around {@see self::get()}. * * @param string $name Icon name. * @param string $class Optional CSS class. * * @return void */ public static function render( string $name, string $class = '' ): void { echo self::get( $name, $class ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Static, pre-escaped SVG markup. } }