﻿£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
<?php
/**
 * Settings_Section.
 *
 * @since 6.1.0
 */

declare( strict_types=1 );

namespace TEC\Common\Admin;

use TEC\Common\Admin\Entities\Element;

/**
 * Class Settings_Section
 *
 * @since 6.1.0
 */
class Settings_Section extends Section {

	/**
	 * Elements for the section.
	 *
	 * @var Element[]
	 */
	protected array $elements = [];

	/**
	 * Add an element to the section.
	 *
	 * @since 6.1.0
	 *
	 * @param Element $element The element to add.
	 *
	 * @return static
	 */
	public function add_element( Element $element ) {
		$this->elements[] = $element;

		return $this;
	}

	/**
	 * Add multiple elements to the section.
	 *
	 * @since 6.1.0
	 *
	 * @param Element[] $elements The elements to add.
	 *
	 * @return static
	 */
	public function add_elements( array $elements ) {
		foreach ( $elements as $element ) {
			$this->add_element( $element );
		}

		return $this;
	}

	/**
	 * Render the section content.
	 *
	 * @since 6.1.0
	 *
	 * @return void
	 */
	public function render() {
		?>
		<div class="tribe-settings-section">
			<?php $this->render_title(); ?>
			<?php $this->render_elements(); ?>
		</div>
		<?php
	}

	/**
	 * Render the elements for the section.
	 *
	 * @since 6.1.0
	 *
	 * @return void
	 */
	protected function render_elements() {
		foreach ( $this->elements as $element ) {
			$element->render();
		}
	}
}
