<?php if($block->getSetting('enabled')):?>
    <div
        class="sticky-notification-bar"
        style="background-color: <?php echo $this->getSetting('background_color')?>; color: <?php echo $this->getSetting('text_color')?>;">
        <span class="content"><?php echo $block->getSetting('content')?></span>
    </div>
    <style>
        <?php echo $block->getSetting("custom_css")?>
    </style>
    <?php if ($block->getSetting('is_sticky')):?>
        <script>
            window.addEventListener("load", function() {
                var notificationBar;
                notificationBar = document.getElementsByClassName("sticky-notification-bar")[0];
                notificationBar.style.position = "fixed";
                document.getElementsByClassName("page-header")[0].style.marginTop = notificationBar.offsetHeight+"px";
            });
        </script>
    <?php endif;?>
<?php endif;?>
