<?php
// Copyright 1999-2026. WebPros International GmbH. All rights reserved.
?>
<div class="panel panel-collapsible <?= $this->titleCssClass ?>" id="<?= $this->id ?>">
    <div class="panel-wrap">
        <?php if ($this->title): ?>
            <div class="panel-heading">
                <div class="panel-heading-wrap">
                    <span class="panel-control"><i></i></span>
                    <h4 class="panel-heading-name">
                        <span><?php echo $this->title; ?></span>
                    </h4>
                </div>
            </div>
        <?php endif; ?>
        <div class="panel-content">
            <div class="panel-content-wrap" id="<?= "{$this->id}-content" ?>">
                <?php if (is_array($this->context)) {
                    $this->context = array_merge(['renderTo' => "{$this->id}-content"], $this->context);
                } elseif (is_null($this->context)) {
                    $this->context = ['renderTo' => "{$this->id}-content"];
                } elseif (is_object($this->context) && !$this->context->renderTo) {
                    $this->context->renderTo = "{$this->id}-content";
                } ?>
                <?= $this->partial($this->contentTemplate, null, $this->context) ?>
            </div>
        </div>
    </div>
</div>
