<?php
// Copyright 1999-2026. WebPros International GmbH. All rights reserved.
?>
{
    componentType: 'Jsw.form.DisplayField',
    fieldLabel: <?php echo $this->jsEscape($this->limitDetails['title']); ?>,
    valueRenderer: function() {
        <?php if (in_array($this->limitName, ['max_traffic', 'disk_space'])): ?>
            var value = <?php echo $this->jsHtml($this->partial('partials/gauge.phtml', ['limitDetails' => $this->limitDetails])); ?>;
        <?php elseif (in_array($this->limitName, ['mbox_quota', 'mssql_dbase_filesize', 'mssql_dbase_log_filesize'])): ?>
            var value = <?php echo $this->jsEscape($this->limitDetails['limitString']); ?>;
        <?php else: ?>
            var value = <?php echo $this->jsEscape($this->limitDetails['usageString']); ?>;
        <?php endif; ?>

        <?php if ($this->limitDetails['isOverused']): ?>
            return '<div class="status-overused">' + value + '</div>';
        <?php else: ?>
            return value;
        <?php endif; ?>
    }
}
