<?php

if ( empty( $value ) || ! is_array( $value ) ) {
	return;
}

$name  = $field['name'] ?? '';
$label = $field['label'] ?? $name;

?>

<div class="ecm-group ecm-group--<?php echo esc_attr( $name ); ?>">
	<?php if ( ! empty( $with_label ) ) : ?>
		<strong class="ecm-group__label"><?php echo esc_html( $label ); ?>:</strong>
	<?php endif; ?>

	<div class="ecm-group__content">
		<?php ecm_nested_template_viewer( $value ); ?>
	</div>
</div>
