<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  WhoSealed Outlook add-in manifest (add-in only XML format, which is the one
  that also works in Outlook on Mac).

  https://whosealed.com is replaced by the server with its PUBLIC_URL when this file is
  requested as /addin/manifest.xml. Outlook requires HTTPS for every URL here.

  Validate after changes:  npx office-addin-manifest validate manifest.xml
-->
<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>a32c5cfe-f2ec-4464-b71b-eb4905b81048</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>WhoSealed</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="WhoSealed"/>
  <Description DefaultValue="Adds a one-time seal code to the mail you send and checks the seal on the mail you receive."/>
  <IconUrl DefaultValue="https://whosealed.com/addin/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://whosealed.com/addin/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://whosealed.com/"/>
  <AppDomains>
    <AppDomain>https://whosealed.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://whosealed.com/addin/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.12">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <Runtimes>
            <!-- HTML page: Outlook on the web, new Outlook on Windows, Outlook on Mac. -->
            <Runtime resid="WebViewRuntime.Url">
              <!-- Plain JavaScript file: classic Outlook on Windows. -->
              <Override type="javascript" resid="JSRuntime.Url"/>
            </Runtime>
          </Runtimes>
          <DesktopFormFactor>
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="whosealedComposeGroup">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="whosealedComposeButton">
                    <Label resid="ComposeButton.Label"/>
                    <Supertip>
                      <Title resid="ComposeButton.Label"/>
                      <Description resid="ComposeButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="whosealedReadGroup">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="whosealedReadButton">
                    <Label resid="ReadButton.Label"/>
                    <Supertip>
                      <Title resid="ReadButton.Label"/>
                      <Description resid="ReadButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <!-- Queues the seal footer as soon as a mail, reply or forward is started. -->
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageComposeHandler"/>
                <!-- Registers the seal with the final recipients. PromptUser never
                     traps a mail: the sender can always choose "Send Anyway". -->
                <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler" SendMode="PromptUser"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://whosealed.com/addin/assets/icon-16.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://whosealed.com/addin/assets/icon-32.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://whosealed.com/addin/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://whosealed.com/addin/launchevent.html"/>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://whosealed.com/addin/launchevent.js"/>
          <bt:Url id="Taskpane.Url" DefaultValue="https://whosealed.com/addin/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="WhoSealed"/>
          <bt:String id="ComposeButton.Label" DefaultValue="WhoSealed"/>
          <bt:String id="ReadButton.Label" DefaultValue="Check seal"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="ComposeButton.Tooltip" DefaultValue="Sign in to WhoSealed and see whether this mail will be sealed."/>
          <bt:String id="ReadButton.Tooltip" DefaultValue="Checks the seal code in this mail and shows who sealed it."/>
        </bt:LongStrings>
      </Resources>
      <!-- Needed for Body.appendOnSendAsync, which adds the seal footer. -->
      <ExtendedPermissions>
        <ExtendedPermission>AppendOnSend</ExtendedPermission>
      </ExtendedPermissions>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
