<?php
defined( 'ABSPATH' ) || exit;

class Jalpi_Element_Spacer extends Jalpi_Element {
    public static function type(): string { return 'spacer'; }

    public function render( array $node, Jalpi_Renderer $renderer ): string {
        $height = sanitize_text_field( $node['settings']['height'] ?? '40px' );
        $a      = $renderer->get_css_attrs( $node );
        return '<div class="jalpi-spacer' . $a['extra_cls'] . '"' . $a['id_attr'] . ' style="height:' . esc_attr( $height ) . '" aria-hidden="true"></div>';
    }
}
