<?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>2f9c0a9e-3a04-4b4e-9a8e-9d0e3b6f7e21</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>PhishWall</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="PhishWall" />
  <Description DefaultValue="Explainable multimodal phishing detection — see why an email is risky and what to do, right in the reading pane." />
  <IconUrl DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-64.png" />
  <HighResolutionIconUrl DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-128.png" />
  <SupportUrl DefaultValue="https://example.com/support" />

  <!-- All hosts the add-in might ever fetch from. Pre-declared to avoid
       reinstalls when we point the add-in at staging or production backends.
       Edit only by replacing entire URLs — never add new origins after
       AppSource publication, since that triggers a re-review. -->
  <AppDomains>
    <!-- :3000 is no longer the task pane's home — the packaged binary serves it
         from :8765/addin. Kept declared so a dev manifest pointed at
         webpack-dev-server (npm start) still works without re-review. -->
    <AppDomain>https://localhost:3000</AppDomain>
    <AppDomain>https://localhost:8765</AppDomain>
    <!-- Icons are served publicly: Outlook renders them from its own web
         UI, not inside the task pane, so a localhost URL showed a broken
         image whenever PhishWall was not running. -->
    <AppDomain>https://phishwall.premiumm-mike.workers.dev</AppDomain>
    <AppDomain>https://127.0.0.1:8765</AppDomain>
    <AppDomain>https://addin.phishwall.local</AppDomain>
    <AppDomain>https://api.phishwall.local</AppDomain>
    <AppDomain>https://staging.phishwall.dev</AppDomain>
    <AppDomain>https://api-staging.phishwall.dev</AppDomain>
    <AppDomain>https://app.phishwall.io</AppDomain>
    <AppDomain>https://api.phishwall.io</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>

  <!-- Bumped from 1.10 to 1.12 so we can use Mailbox 1.12 APIs in future
       (getInternetMessageHeadersAsync, etc.) without reinstall. 1.12 is
       supported by Outlook on Windows, Mac, web, and mobile from 2024+. -->
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.12" />
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:8765/addin/taskpane.html" />
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</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.12">
        <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="phishwall.group">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="phishwall.taskpane.button">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.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://phishwall.premiumm-mike.workers.dev/v1/addin/icon-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-32.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:8765/addin/taskpane.html" />
        <bt:Url id="Commands.Url" DefaultValue="https://localhost:8765/addin/commands.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="PhishWall" />
        <bt:String id="TaskpaneButton.Label" DefaultValue="Scan email" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open PhishWall to see why this email is or isn't risky." />
      </bt:LongStrings>
    </Resources>

    <!-- VersionOverrides V1_1: enables SupportsPinning. After the user pins
         the task pane once, it stays open as they click through emails;
         the pane's own ItemChanged handler re-runs /scan automatically.
         Same auto-scan UX as LaunchEvent OnMessageRead, but tenant
         policies don't tend to block pinning the way they block events. -->
    <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">
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url" />
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="phishwall.group">
                  <Label resid="GroupLabel" />
                  <Control xsi:type="Button" id="phishwall.taskpane.button">
                    <Label resid="TaskpaneButton.Label" />
                    <Supertip>
                      <Title resid="TaskpaneButton.Label" />
                      <Description resid="TaskpaneButton.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://phishwall.premiumm-mike.workers.dev/v1/addin/icon-16.png" />
          <bt:Image id="Icon.32x32" DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-32.png" />
          <bt:Image id="Icon.80x80" DefaultValue="https://phishwall.premiumm-mike.workers.dev/v1/addin/icon-80.png" />
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:8765/addin/taskpane.html" />
          <bt:Url id="Commands.Url" DefaultValue="https://localhost:8765/addin/commands.html" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="PhishWall" />
          <bt:String id="TaskpaneButton.Label" DefaultValue="Scan email" />
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open PhishWall to see why this email is or isn't risky." />
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
