<?php
/**
 * Details - Template
 * 
 * @package OrokuBlocks
 * @author OrokuBlocks (https://orokublocks.com/)
 * 
 * @since 1.0.0
 * 
 * @param array $args {
 *   @type string $title      Details title.
 *   @type array $details     Array of details.
 * }
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
  exit;
}

$defaults = [
  'details' => []
];

$options = array_merge( $defaults, $args );

?>
<div class="oroku-details">
  <h3 class="oroku-details__heading oroku-h4"><?php echo esc_html( $options['title'] ); ?></h3>

  <table class="oroku-table">
    <tbody>
    <?php foreach ( $options['details'] as $details ) : ?>
      <tr>
      <?php foreach ( $details as $detail ) : ?>
        <td><?php echo esc_html( $detail ); ?></td>
      <?php endforeach; ?>
      </tr>
    <?php endforeach; ?>
    </tbody>
  </table>
</div>