<?php

/**
 * Debug Bar panels template.
 *
 * This file is part of the Tracy (http://tracy.nette.org)
 * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 *
 * @param  array $rows
 */

namespace Tracy;

use Tracy;
use Tracy\Helpers;

$icons = '
	<div class="tracy-icons">
		<a href="#" title="open in window">&curren;</a>
		<a href="#" rel="close" title="close window">&times;</a>
	</div>
';

foreach ($rows as $row) {
	foreach ($row->panels as $panel) {
		$content = $panel->panel ? ($panel->panel . "\n" . $icons) : '';
		$class = 'tracy-panel ' . ($row->type === 'ajax' ? 'tracy-ajax' : ''); ?>
		<div class="<?= $class ?>" id="tracy-debug-panel-<?= $panel->id ?>" data-tracy-content="<?= Helpers::escapeHtml($content) ?>"></div><?php
	}
}
