<?xml version="1.0" encoding="UTF-8"?>
<!--
  ScanHawk OUTLOOK manifest (message-read taskpane), add-in only (XML) format.

  This is one of three manifests for one web app - see MANIFEST.md. An XML
  manifest is typed at the root as MailApp or TaskPaneApp and cannot be both, so
  this file reaches mailboxes only; manifest.office.xml reaches Word, Excel,
  PowerPoint and OneNote; manifest.json reaches Outlook AND the document hosts in
  one install, and is the route to prefer.

  It shares its <Id> with manifest.json on purpose: same add-in, two formats, so
  the JSON one upgrades this rather than installing beside it.

  Validate before sideloading:
    npx office-addin-manifest validate manifest.xml
  GENERATED by test/serve.mjs for https://addin.scanhawk.app — edit manifest.xml, not this file. Icons live in /assets (generated by assets/generate.mjs).
-->
<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>452b7d12-9d7f-4252-9d8b-617ca811236b</Id>
  <Version>1.1.0.0</Version>
  <ProviderName>TwentyPin</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="ScanHawk — Link Safety" />
  <Description DefaultValue="Check the links in an email for phishing before you click." />
  <IconUrl DefaultValue="https://addin.scanhawk.app/assets/icon-64.png" />
  <HighResolutionIconUrl DefaultValue="https://addin.scanhawk.app/assets/icon-128.png" />
  <SupportUrl DefaultValue="https://scanhawk.io/support" />

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.5" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://addin.scanhawk.app/src/taskpane.html" />
        <RequestedHeight>440</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>
          <!-- Message-read surface: a "Scan links" button that opens the taskpane.
               The taskpane is pinnable, so it stays open and re-scans as the user
               moves between messages (ItemChanged in taskpane.js). -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="ssGroup">
                <Label resid="groupLabel" />
                <Control xsi:type="Button" id="ssScanButton">
                  <Label resid="btnLabel" />
                  <Supertip>
                    <Title resid="btnLabel" />
                    <Description resid="btnTip" />
                  </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://addin.scanhawk.app/assets/icon-16.png" />
        <bt:Image id="icon32" DefaultValue="https://addin.scanhawk.app/assets/icon-32.png" />
        <bt:Image id="icon80" DefaultValue="https://addin.scanhawk.app/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="taskpaneUrl" DefaultValue="https://addin.scanhawk.app/src/taskpane.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="ScanHawk" />
        <bt:String id="btnLabel" DefaultValue="Scan links" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="btnTip" DefaultValue="Check the links in this email for phishing before you click." />
      </bt:LongStrings>
    </Resources>

    <!-- V1.1 overrides the read button to make the taskpane PINNABLE, so it
         stays open and re-scans as the user moves between messages. Hosts that
         only understand the V1.0 schema fall back to the button above. -->
    <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>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="ssGroup">
                  <Label resid="groupLabel" />
                  <Control xsi:type="Button" id="ssScanButton">
                    <Label resid="btnLabel" />
                    <Supertip>
                      <Title resid="btnLabel" />
                      <Description resid="btnTip" />
                    </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" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
