<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="MediaViewer" parent="GtkWidget">
    <child>
      <object class="AdwFlap" id="flap">
        <property name="orientation">vertical</property>
        <property name="locked" bind-source="MediaViewer" bind-property="fullscreened" bind-flags="sync-create|invert-boolean"/>
        <property name="reveal-flap" bind-source="MediaViewer" bind-property="fullscreened" bind-flags="sync-create|invert-boolean"/>
        <property name="overflow">visible</property>
        <child type="flap">
          <object class="GtkHeaderBar" id="header_bar">
            <style>
              <class name="osd"/>
            </style>
            <property name="title-widget">
              <object class="GtkLabel">
                <binding name="label">
                  <lookup name="body">MediaViewer</lookup>
                </binding>
                <property name="single-line-mode">True</property>
                <property name="ellipsize">end</property>
                <style>
                  <class name="title"/>
                </style>
              </object>
            </property>
            <child type="start">
              <object class="GtkButton" id="back">
                <property name="icon-name">go-previous-symbolic</property>
                <property name="action-name">media-viewer.close</property>
              </object>
            </child>
            <child type="end">
              <object class="GtkMenuButton" id="menu">
                <property name="icon-name">view-more-symbolic</property>
              </object>
            </child>
            <child type="end">
              <object class="GtkButton">
                <property name="visible" bind-source="MediaViewer" bind-property="fullscreened" bind-flags="sync-create|invert-boolean"/>
                <property name="icon-name">view-fullscreen-symbolic</property>
                <property name="action-name">win.toggle-fullscreen</property>
              </object>
            </child>
            <child type="end">
              <object class="GtkButton">
                <property name="visible" bind-source="MediaViewer" bind-property="fullscreened" bind-flags="sync-create"/>
                <property name="icon-name">view-restore-symbolic</property>
                <property name="action-name">win.toggle-fullscreen</property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="ComponentsScaleRevealer" id="revealer">
            <property name="halign">center</property>
            <property name="valign">center</property>
            <property name="vexpand">true</property>
            <property name="child">
              <object class="ComponentsMediaContentViewer" id="media">
                <property name="autoplay">true</property>
              </object>
            </property>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="GtkEventControllerMotion">
        <signal name="motion" handler="handle_motion" swapped="yes"/>
      </object>
    </child>
    <child>
      <object class="GtkGestureClick">
        <property name="touch-only">true</property>
        <signal name="pressed" handler="handle_touch" swapped="yes"/>
      </object>
    </child>
    <child>
      <object class="GtkGestureClick">
        <signal name="pressed" handler="handle_click" swapped="yes"/>
      </object>
    </child>
  </template>
</interface>
