[%- broadcasts = get_broadcasts(c) -%]
[%- IF c.stash.defined("broadcast"); broadcasts = [broadcast]; END -%]
[%- IF broadcasts.size > 0 -%]
  <div class="card mt-1 min-w-[200px] shadow-float rounded-t-none fixed -top-1 right-96 z-10 js-broadcast-panel noprint">
    [% IF broadcasts.size > 1 %]
    <div class="flexrow gap-0 flex-nowrap justify-between">
      <div>
        <div class="js-previous text-center grow hoverable clickable" style="visibility: hidden;" onclick="broadcast_show_list(-1);"><i class="uil uil-angle-left"></i></div>
        <div class="js-next     text-center grow hoverable clickable"[% IF broadcasts.size == 1 %] style="visibility: hidden;"[% END %] onclick="broadcast_show_list(1);"><i class="uil uil-angle-right"></i></div>
      </div>
      [% IF c.user_exists %]
        <a class="button iconOnly medium hoverable p-1" href="#" onclick="broadcast_dismiss(); return(false);"><i class="uil uil-times"></i></a>
      [% END %]
    </div>
    [% END %]
    <div class="body">
      [% IF c.user_exists && broadcasts.size == 1 %]
        <a class="button iconOnly medium hoverable block" style="float: right; clear: both;" href="#" onclick="broadcast_dismiss(); return(false);"><i class="uil uil-times"></i></a>
      [% END %]
      <div class="w-full">
        [% FOREACH n = broadcasts %]
          <div class="broadcast [% IF !loop.first %]hidden[% END %]">
            [% IF n.annotation == "info" %]
              <i class="uil uil-info round gray" title="Info"></i>
            [% ELSIF n.annotation == "warning" %]
              <i class="fa-solid fa-exclamation round small yellow" title="Warning"></i>
            [% END %]
            [% replace_macros(replace_macros(n.text, n.frontmatter), n.macros) %]
          </div>
        [% END %]
      </div>
    </div>
  </div>
[%- END -%]
