<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="ChattyInfoDialog" parent="GtkDialog">
    <property name="modal">1</property>
    <property name="default-width">360</property>
    <property name="default-height">576</property>
    <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="yes"/>

    <child type="titlebar">
      <object class="HdyTitleBar">
        <property name="visible">1</property>
        <child>
          <object class="GtkHeaderBar">
            <property name="visible">1</property>
            <property name="show-close-button" bind-source="invite_button" bind-property="visible"
                      bind-flags="invert-boolean|sync-create"/>
            <property name="title" translatable="yes">Chat Details</property>

            <!-- New Invite button -->
            <child>
              <object class="GtkButton" id="new_invite_button">
                <property name="visible">1</property>
                <property name="can-focus">0</property>
                <property name="receives-default">0</property>
                <signal name="clicked" handler="info_dialog_new_invite_clicked_cb" swapped="yes"/>
                <child>
                  <object class="GtkImage">
                    <property name="visible">1</property>
                    <property name="icon_name">contact-new-symbolic</property>
                  </object>
                </child>
              </object>
              <packing>
                <property name="pack-type">end</property>
              </packing>
            </child>

            <!-- Cancel button -->
            <child>
              <object class="GtkButton">
                <property name="visible" bind-source="invite_button" bind-property="visible"
                          bind-flags="sync-create"/>
                <property name="sensitive">1</property>
                <property name="label" translatable="yes">Cancel</property>
                <signal name="clicked" handler="info_dialog_cancel_clicked_cb" swapped="yes"/>
              </object>
            </child>

            <!-- Invite button -->
            <child>
              <object class="GtkButton" id="invite_button">
                <property name="visible">0</property>
                <property name="sensitive">0</property>
                <property name="has-default">1</property>
                <property name="can-default">1</property>
                <property name="label" translatable="yes">Invite</property>
                <signal name="clicked" handler="info_dialog_invite_clicked_cb" swapped="yes"/>
                <style>
                  <class name="suggested-action"/>
                </style>
              </object>
              <packing>
                <property name="pack-type">end</property>
              </packing>
            </child>

          </object>
        </child>
      </object> <!-- ./HdyTitleBar -->
        </child>

    <child internal-child="vbox">
      <object class="GtkBox">
        <property name="visible">1</property>
        <property name="expand">1</property>
        <property name="border-width">0</property>

        <child>
          <object class="GtkStack" id="main_stack">
            <property name="visible">1</property>
            <property name="transition-type">slide-left-right</property>

            <child>
              <object class="GtkStack" id="chat_type_stack">
                <property name="visible">1</property>
                <child>
                  <object class="ChattyPpChatInfo" id="pp_chat_info">
                    <property name="visible">1</property>
                  </object>
                </child>
                <child>
                  <object class="ChattyMaChatInfo" id="ma_chat_info">
                    <property name="visible">1</property>
                  </object>
                </child>
              </object>
            </child>

            <child>
              <object class="HdyPreferencesPage" id="invite_page">
                <property name="visible">1</property>
                <property name="expand">1</property>
                <child>
                  <object class="HdyPreferencesGroup">
                    <property name="visible">1</property>
                    <child>
                      <object class="GtkGrid">
                        <property name="visible">1</property>
                        <property name="halign">center</property>
                        <property name="valign">start</property>
                        <property name="column-spacing">6</property>
                        <property name="row-spacing">12</property>
                        <property name="orientation">vertical</property>

                        <child>
                          <object class="GtkImage">
                            <property name="visible">1</property>
                            <property name="margin-bottom">32</property>
                            <property name="icon_name">avatar-default-symbolic</property>
                            <property name="pixel-size">72</property>
                          </object>
                          <packing>
                            <property name="width">2</property>
                          </packing>
                        </child>

                        <!-- Contact ID -->
                        <child>
                          <object class="GtkLabel">
                            <property name="visible">1</property>
                            <property name="xalign">1</property>
                            <property name="label" translatable="no">Contact ID</property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkEntry" id="contact_id_entry">
                            <property name="visible">1</property>
                            <property name="expand">1</property>
                            <property name="halign">start</property>
                            <signal name="changed" handler="info_dialog_contact_id_changed_cb" swapped="yes" />
                          </object>
                          <packing>
                            <property name="left-attach">1</property>
                            <property name="top-attach">1</property>
                          </packing>
                        </child>

                        <!-- Invite message -->
                        <child>
                          <object class="GtkLabel">
                            <property name="visible">1</property>
                            <property name="xalign">1</property>
                            <property name="label" translatable="no">Invite message</property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkEntry" id="message_entry">
                            <property name="visible">1</property>
                            <property name="expand">1</property>
                            <property name="halign">start</property>
                          </object>
                          <packing>
                            <property name="left-attach">1</property>
                            <property name="top-attach">2</property>
                          </packing>
                        </child>

                      </object>
                    </child>
                  </object> <!-- ./HdyPreferencesGroup -->
                </child>
              </object>
            </child>

          </object> <!-- GtkStack -->
        </child>
      </object>
    </child>

  </template>

  <object class="GtkFileChooserDialog" id="avatar_chooser_dialog">
    <property name="modal">1</property>
    <property name="transient-for">ChattyInfoDialog</property>
    <property name="filter">image_filter</property>
    <property name="title" translatable="yes">Set Avatar</property>
    <signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
    <child type="action">
      <object class="GtkButton" id="avatar_cancel_button">
        <property name="visible">1</property>
        <property name="label" translatable="yes">Cancel</property>
      </object>
    </child>
    <child type="action">
      <object class="GtkButton" id="avatar_apply_button">
        <property name="visible">1</property>
        <property name="can-default">1</property>
        <property name="label" translatable="yes">Open</property>
      </object>
    </child>
    <action-widgets>
      <action-widget response="cancel">avatar_cancel_button</action-widget>
      <action-widget response="apply" default="true">avatar_apply_button</action-widget>
    </action-widgets>
  </object>

  <object class="GtkFileFilter" id="image_filter">
    <mime-types>
      <mime-type>image/*</mime-type>
    </mime-types>
  </object>

  <object class="GtkTextBuffer" id="topic_buffer"/>

</interface>
