<?php

if (!defined('ABSPATH')) { exit; }
?>
<div class="aieo-dmm-section">
    <h2><?php esc_html_e('ERP bridge', 'ai-eshop-optimizer'); ?></h2>
    <p class="description">
        <?php esc_html_e('DMM exposes the following integration points for ERP connectors (e.g. rooster-erp-connector) and for custom code.', 'ai-eshop-optimizer'); ?>
    </p>

    <?php foreach ($hooks as $hook) : ?>
        <div class="aieo-dmm-hook-card">
            <h3>
                <span class="aieo-dmm-hook-type aieo-dmm-hook-<?php echo esc_attr($hook['type']); ?>">
                    <?php echo esc_html(strtoupper($hook['type'])); ?>
                </span>
                <code><?php echo esc_html($hook['name']); ?></code>
            </h3>
            <p><?php echo esc_html($hook['description']); ?></p>
            <pre class="aieo-dmm-code"><?php echo esc_html($hook['example']); ?></pre>
        </div>
    <?php endforeach; ?>
</div>
