<?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>6a667e29-79d0-4ff2-89ca-faa6bc31cf5d</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>PQ PDF</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="PQ PDF Forensics Scanner"/>
  <Description DefaultValue="Run a full forensic scan on PDF email attachments — malware, exploits, tampering, and AI-ingestion attacks — without leaving Outlook."/>
  <IconUrl DefaultValue="https://pqpdf.com/outlook/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://pqpdf.com/outlook/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://pqpdf.com/tools/scan.php"/>

  <!-- Domains the add-in is allowed to navigate to -->
  <AppDomains>
    <AppDomain>https://pqpdf.com</AppDomain>
    <AppDomain>https://api.pqpdf.com</AppDomain>
  </AppDomains>

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

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

  <!-- Fallback (older clients): open the taskpane on message read -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://pqpdf.com/outlook/taskpane.html"/>
        <RequestedHeight>450</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>

  <!-- Modern add-in commands (ribbon button + taskpane) -->
  <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>
          <FunctionFile resid="commandsUrl"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="pqpdfGroup">
                <Label resid="groupLabel"/>
                <Control xsi:type="Button" id="pqpdfScanButton">
                  <Label resid="scanButtonLabel"/>
                  <Supertip>
                    <Title resid="scanButtonLabel"/>
                    <Description resid="scanButtonTip"/>
                  </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://pqpdf.com/outlook/assets/icon-16.png"/>
        <bt:Image id="icon32" DefaultValue="https://pqpdf.com/outlook/assets/icon-32.png"/>
        <bt:Image id="icon80" DefaultValue="https://pqpdf.com/outlook/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="taskpaneUrl" DefaultValue="https://pqpdf.com/outlook/taskpane.html"/>
        <bt:Url id="commandsUrl" DefaultValue="https://pqpdf.com/outlook/commands.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="PQ PDF"/>
        <bt:String id="scanButtonLabel" DefaultValue="Scan PDF"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="scanButtonTip" DefaultValue="Forensically scan the PDF attachments on this message with PQ PDF."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
