<?php /** @var \Dotdigitalgroup\Email\Block\Adminhtml\Logviewer $block */?>
<div class="switcher">
    <label style="font-weight: bold; padding-right: 10px;" for="connector-log-selector">
        <?= $block->escapeHtml(__('Select Log File:')); ?>
    </label>
    <select id="connector-log-selector" style="width: 20em">
        <option value="connector"><?= $block->escapeHtml(__('Marketing Automation Log')); ?></option>
        <option value="system"><?= $block->escapeHtml(__('Magento System Log')); ?></option>
        <option value="exception"><?= $block->escapeHtml(__('Magento Exception Log')); ?></option>
        <option value="debug"><?= $block->escapeHtml(__('Magento Debug Log')); ?></option>
    </select>
    <button id="connector-log-reloader" style="margin-left: 5px;">
        <span><?= $block->escapeHtml(__('Reload')); ?></span>
    </button>
</div>
<div style="padding-top: 25px;">
    <h3 id="connector-log-header" style="border-bottom: 4px solid #dfdfdf; color: #eb5e00;">
        <?= $block->escapeHtml(__('Marketing Automation Log')); ?>
    </h3>
</div>

<div style="border: 4px solid #dfdfdf; overflow: hidden; height: 510px; padding: 5px;">
    <div id="log_data"
         style="width:100%;height:500px;overflow:auto;margin:0;padding:3px;background:black;color:#2EC029;
         font:normal 11px Lucida Console, Courier New, serif;">
        <?php /** $block \Dotdigitalgroup\Email\Block\Adminhtml\Logviewer */ ?>
        <?= /* @noEscape */ $block->getLogFileContent(); ?>
    </div>
</div>

<script type="text/x-magento-init">
    {
        "*": {
            "Dotdigitalgroup_Email/js/logUpdater":{
                "url":"<?= $block->escapeUrl($block->getAjaxUrl()) ?>"
            }
        }
    }
</script>