<?xml version="1.0" encoding="UTF-8"?>
<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>b8e1c0a2-3f4d-4c5e-9a7b-2d6f1e0c4a91</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>SW Technology Solutions</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Votanica Share" />
  <Description DefaultValue="Replace email attachments with secure, self-expiring Votanica Share links." />
  <IconUrl DefaultValue="https://share.votanica.tech/static/img/sw_tech_logo.png" />
  <HighResolutionIconUrl DefaultValue="https://share.votanica.tech/static/img/sw_tech_logo.png" />
  <SupportUrl DefaultValue="https://share.votanica.tech/addin/" />

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

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

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://share.votanica.tech/addin/taskpane" />
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

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

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

    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="taskpaneUrl" />

          <!-- Ribbon button shown while composing a new message. -->
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="votanicaGroup">
                <Label resid="groupLabel" />
                <Control xsi:type="Button" id="votanicaShareButton">
                  <Label resid="buttonLabel" />
                  <Supertip>
                    <Title resid="buttonLabel" />
                    <Description resid="buttonTip" />
                  </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="taskpaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="https://share.votanica.tech/static/img/sw_tech_logo.png" />
        <bt:Image id="icon32" DefaultValue="https://share.votanica.tech/static/img/sw_tech_logo.png" />
        <bt:Image id="icon80" DefaultValue="https://share.votanica.tech/static/img/sw_tech_logo.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="taskpaneUrl" DefaultValue="https://share.votanica.tech/addin/taskpane" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Votanica Share" />
        <bt:String id="buttonLabel" DefaultValue="Secure link" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="buttonTip" DefaultValue="Upload a file and insert a secure, self-expiring download link into this email." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>