<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
  xsi:type="MailApp">

  <Id>173d34bd-3ec7-4726-8d67-34c99a215675</Id>
  <Version>1.0.0</Version>
  <ProviderName>datamate</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Seafile for Outlook"/>
  <Description DefaultValue="Share email attachments via Seafile download links, insert links to existing Seafile files, and save received attachments to Seafile."/>

  <IconUrl DefaultValue="https://outlook.datamate.org/assets/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://outlook.datamate.org/assets/icon-80.png"/>
  <SupportUrl DefaultValue="https://www.seafile.com"/>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.8"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook.datamate.org/read/read.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>

  <DisableEntityHighlighting>true</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.8">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>

    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>

          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="composeGroup">
                <Label resid="groupLabel"/>

                <Control xsi:type="Button" id="composeUploadBtn">
                  <Label resid="composeUploadLabel"/>
                  <Supertip>
                    <Title resid="composeUploadLabel"/>
                    <Description resid="composeUploadDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="composeTaskpaneUrl"/>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="composeInsertBtn">
                  <Label resid="composeInsertLabel"/>
                  <Supertip>
                    <Title resid="composeInsertLabel"/>
                    <Description resid="composeInsertDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="insertTaskpaneUrl"/>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="settingsBtn">
                  <Label resid="settingsLabel"/>
                  <Supertip>
                    <Title resid="settingsLabel"/>
                    <Description resid="settingsDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="settingsTaskpaneUrl"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="readGroup">
                <Label resid="groupLabel"/>

                <Control xsi:type="Button" id="readSaveBtn">
                  <Label resid="readSaveLabel"/>
                  <Supertip>
                    <Title resid="readSaveLabel"/>
                    <Description resid="readSaveDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="readTaskpaneUrl"/>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="readSettingsBtn">
                  <Label resid="settingsLabel"/>
                  <Supertip>
                    <Title resid="settingsLabel"/>
                    <Description resid="settingsDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon16"/>
                    <bt:Image size="32" resid="icon32"/>
                    <bt:Image size="80" resid="icon80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="settingsTaskpaneUrl"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="https://outlook.datamate.org/assets/icon-16.png"/>
        <bt:Image id="icon32" DefaultValue="https://outlook.datamate.org/assets/icon-32.png"/>
        <bt:Image id="icon80" DefaultValue="https://outlook.datamate.org/assets/icon-80.png"/>
      </bt:Images>

      <bt:Urls>
        <bt:Url id="composeTaskpaneUrl" DefaultValue="https://outlook.datamate.org/compose/compose.html"/>
        <bt:Url id="insertTaskpaneUrl" DefaultValue="https://outlook.datamate.org/compose/compose.html?mode=insert"/>
        <bt:Url id="readTaskpaneUrl" DefaultValue="https://outlook.datamate.org/read/read.html"/>
        <bt:Url id="settingsTaskpaneUrl" DefaultValue="https://outlook.datamate.org/settings/settings.html"/>
      </bt:Urls>

      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Seafile"/>
        <bt:String id="composeUploadLabel" DefaultValue="Upload to Seafile"/>
        <bt:String id="composeInsertLabel" DefaultValue="Insert Seafile Link"/>
        <bt:String id="readSaveLabel" DefaultValue="Save to Seafile"/>
        <bt:String id="settingsLabel" DefaultValue="Seafile Settings"/>
      </bt:ShortStrings>

      <bt:LongStrings>
        <bt:String id="composeUploadDesc" DefaultValue="Upload email attachments to Seafile and replace them with download links."/>
        <bt:String id="composeInsertDesc" DefaultValue="Browse your Seafile libraries and insert a share link to an existing file."/>
        <bt:String id="readSaveDesc" DefaultValue="Save email attachments to your Seafile library."/>
        <bt:String id="settingsDesc" DefaultValue="Configure your Seafile server connection and preferences."/>
      </bt:LongStrings>
    </Resources>

  </VersionOverrides>
</OfficeApp>
