<?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>CFA080A1-C24E-4E82-A7BD-4962814E07E8</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Blue Lantern Security</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Blue Lantern EML Exporter"/>
  <Description DefaultValue="Send the open email as a .eml file to the Blue Lantern Email Threat Analyzer."/>
  <IconUrl DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
  <HighResolutionIconUrl DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
  <SupportUrl DefaultValue="https://bluelanternsecurity.io/"/>

  <AppDomains>
    <AppDomain>https://bluelanternsecurity.io</AppDomain>
    <AppDomain>https://api.bluelanternsecurity.io</AppDomain>
  </AppDomains>

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

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

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook-plugin.bluelanternsecurity.io/taskpane.html"/>
        <RequestedHeight>360</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadItem</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">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.5">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="bluelanternGroup">
                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="bluelanternSendButton">
                  <Label resid="SendButton.Label"/>
                  <Supertip>
                    <Title resid="SendButton.Label"/>
                    <Description resid="SendButton.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>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://outlook-plugin.bluelanternsecurity.io/commands.html"/>
        <bt:Url id="Taskpane.Url" DefaultValue="https://outlook-plugin.bluelanternsecurity.io/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Blue Lantern"/>
        <bt:String id="SendButton.Label" DefaultValue="Send as EML"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="SendButton.Tooltip" DefaultValue="Export this email as .eml and submit to the Blue Lantern Email Threat Analyzer."/>
      </bt:LongStrings>
    </Resources>

    <!-- v1.1 overrides: identical surface, plus taskpane pinning -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="bluelanternGroup">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="bluelanternSendButton">
                    <Label resid="SendButton.Label"/>
                    <Supertip>
                      <Title resid="SendButton.Label"/>
                      <Description resid="SendButton.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>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://bluelanternsecurity.io/Logo-ILaY1O8G.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://outlook-plugin.bluelanternsecurity.io/commands.html"/>
          <bt:Url id="Taskpane.Url" DefaultValue="https://outlook-plugin.bluelanternsecurity.io/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="Blue Lantern"/>
          <bt:String id="SendButton.Label" DefaultValue="Send as EML"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="SendButton.Tooltip" DefaultValue="Export this email as .eml and submit to the Blue Lantern Email Threat Analyzer."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
