<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  Outlook needs its OWN manifest: a legacy XML manifest declares exactly one
  xsi:type, and Mailbox (MailApp) cannot be combined with the Document /
  Workbook / Presentation hosts in manifest.xml (TaskPaneApp). Both manifests
  point at the same hosted pane; the pane branches on Office.HostType.
-->
<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>7c4d0f2a-9b31-4e56-8a10-3f7c2d9e4b81</Id>
  <Version>1.1.1.0</Version>
  <ProviderName>Infinia Technology</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Ask Atlas"/>
  <Description DefaultValue="Ask Atlas about the email you are reading or writing, and insert the answer straight into your message."/>
  <IconUrl DefaultValue="https://atlas-office-plugin.infinialabs.ai/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://atlas-office-plugin.infinialabs.ai/assets/icon-80.png"/>
  <SupportUrl DefaultValue="mailto:atlas@xailon.ai"/>

  <AppDomains>
    <AppDomain>https://api-atlas.xailon.ai</AppDomain>
  </AppDomains>

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

  <Requirements>
    <Sets DefaultMinVersion="1.3">
      <Set Name="Mailbox" MinVersion="1.3"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://atlas-office-plugin.infinialabs.ai/taskpane.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://atlas-office-plugin.infinialabs.ai/taskpane.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit"/>
  </Rule>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
  <!-- V1_1 is what allows <SupportsPinning>: without it Outlook never raises
       ItemChanged, so a pane left open across emails kept showing the previous
       email's conversation (tester report, new Outlook for Mac). -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>

          <!-- Reading a message -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="Atlas.Group.MsgRead">
                <Label resid="Group.Label"/>
                <Control xsi:type="Button" id="Atlas.Button.MsgRead">
                  <Label resid="Button.Label"/>
                  <Supertip>
                    <Title resid="Button.Label"/>
                    <Description resid="Button.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16"/>
                    <bt:Image size="32" resid="Icon.32"/>
                    <bt:Image size="80" resid="Icon.80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                    <SupportsPinning>true</SupportsPinning>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <!-- Composing a message -->
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="Atlas.Group.MsgCompose">
                <Label resid="Group.Label"/>
                <Control xsi:type="Button" id="Atlas.Button.MsgCompose">
                  <Label resid="Button.Label"/>
                  <Supertip>
                    <Title resid="Button.Label"/>
                    <Description resid="Button.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16"/>
                    <bt:Image size="32" resid="Icon.32"/>
                    <bt:Image size="80" resid="Icon.80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <!-- Reading an appointment -->
          <ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="Atlas.Group.ApptOrganizer">
                <Label resid="Group.Label"/>
                <Control xsi:type="Button" id="Atlas.Button.ApptOrganizer">
                  <Label resid="Button.Label"/>
                  <Supertip>
                    <Title resid="Button.Label"/>
                    <Description resid="Button.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16"/>
                    <bt:Image size="32" resid="Icon.32"/>
                    <bt:Image size="80" resid="Icon.80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://atlas-office-plugin.infinialabs.ai/assets/icon-16.png"/>
        <bt:Image id="Icon.32" DefaultValue="https://atlas-office-plugin.infinialabs.ai/assets/icon-32.png"/>
        <bt:Image id="Icon.80" DefaultValue="https://atlas-office-plugin.infinialabs.ai/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://atlas-office-plugin.infinialabs.ai/commands.html"/>
        <bt:Url id="Taskpane.Url" DefaultValue="https://atlas-office-plugin.infinialabs.ai/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Group.Label" DefaultValue="Atlas"/>
        <bt:String id="Button.Label" DefaultValue="Ask Atlas"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Button.Tooltip" DefaultValue="Open the Atlas pane to ask about this email and insert answers back."/>
      </bt:LongStrings>
    </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
