<?xml version="1.0" encoding="UTF-8"?>
<!--
  This is the classic (XML) Outlook add-in manifest, kept alongside
  manifest.json (the newer unified manifest for Microsoft 365) for one
  practical reason: as of today, Outlook's own "My add-ins -> Add a custom
  add-in -> Add from file" self-serve upload flow only accepts THIS format.
  The unified manifest's sideloading story currently requires developer
  tooling (Microsoft 365 Agents Toolkit / npm / the Teams app store) rather
  than a simple file upload, not something to hand a non-technical
  customer. This file is what "sideload now" (see sideloading.md) actually
  means for a real Agreemnt customer today.

  Functionally identical to manifest.json: one "Send to Agreemnt" button
  (runs commands.js's sendToAgreemnt, an ExecuteFunction) and one "Agreemnt
  Settings" button (opens taskpane.html) on the read-pane ribbon. Both files
  point at the same commands.html/commands.js/taskpane.html/taskpane.js, so
  there's nothing to keep in sync beyond this manifest itself.
-->
<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"
  xsi:type="MailApp">

  <Id>940d11d0-df0a-4ea2-bff2-15da2e2c5331</Id>
  <Version>1.0.1.0</Version>
  <ProviderName>Agreemnt Ltd</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Agreemnt" />
  <Description DefaultValue="Forward a contract email to Agreemnt in one click, without leaving Outlook." />
  <IconUrl DefaultValue="https://app.agreemnt.com/outlook-addin/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://app.agreemnt.com/outlook-addin/assets/icon-80.png" />
  <SupportUrl DefaultValue="https://www.agreemnt.com/terms.html" />

  <AppDomains>
    <AppDomain>https://app.agreemnt.com</AppDomain>
  </AppDomains>

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

  <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/1.0" 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="Commands.Url" />

          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="agreemntGroup">
                <Label resid="GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>

                <Control xsi:type="Button" id="btnSendToAgreemnt">
                  <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="ExecuteFunction">
                    <FunctionName>sendToAgreemnt</FunctionName>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="btnOpenAgreemntSettings">
                  <Label resid="SettingsButton.Label" />
                  <Supertip>
                    <Title resid="SettingsButton.Label" />
                    <Description resid="SettingsButton.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://app.agreemnt.com/outlook-addin/assets/icon-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://app.agreemnt.com/outlook-addin/assets/icon-32.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://app.agreemnt.com/outlook-addin/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://app.agreemnt.com/outlook-addin/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://app.agreemnt.com/outlook-addin/taskpane.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Agreemnt" />
        <bt:String id="SendButton.Label" DefaultValue="Send to Agreemnt" />
        <bt:String id="SettingsButton.Label" DefaultValue="Agreemnt Settings" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="SendButton.Tooltip" DefaultValue="Open a pre-filled forward of this email to your Agreemnt inbound address -- click Send to add it to your account." />
        <bt:String id="SettingsButton.Tooltip" DefaultValue="One-time setup: paste in your organization's Agreemnt inbound address, from Agreemnt Settings -> Team." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
