<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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">

  <!-- Basic Information -->
  <Id>D6314DA7-39E0-4A6C-A4A5-6F8F5528E48F</Id>
  <Version>1.0.5.0</Version>
  <ProviderName>TAC</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="TAC" />
  <Description DefaultValue="Automatically insert signature when composing emails" />
  <IconUrl DefaultValue="https://outlook.touchandcontact.com/assets/icon-64.png" />
  <HighResolutionIconUrl
    DefaultValue="https://outlook.touchandcontact.com/assets/icon-128.png" />
  <SupportUrl DefaultValue="https://app.touchandcontact.com" />

  <AppDomains>
    <AppDomain>https://outlook.touchandcontact.com</AppDomain>
    <AppDomain>https://api.touchandcontact.com</AppDomain>
  </AppDomains>

  <!-- Capabilities -->
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>

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

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook.touchandcontact.com/taskpane.html" />
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

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

  <!-- Version Overrides for Modern Outlook -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">

      <Requirements>
        <bt:Sets DefaultMinVersion="1.10">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">

          <Runtimes>
            <Runtime resid="WebViewRuntime.Url">
              <Override type="javascript" resid="JSRuntime.Url" />
            </Runtime>
          </Runtimes>

          <DesktopFormFactor>
            <!-- Extension point for event-based activation -->
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageCompose" />
                <LaunchEvent Type="OnMessageRecipientsChanged"
                  FunctionName="onMessageRecipientsChanged" />
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url" />
            </ExtensionPoint>

            <!-- Extension point for taskpane button -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgComposeGroup">
                  <Label resid="GroupLabel" />
                  <Control xsi:type="Button" id="msgComposeOpenPaneButton">
                    <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="20" resid="Icon.20x20" />
                      <bt:Image size="24" resid="Icon.24x24" />
                      <bt:Image size="32" resid="Icon.32x32" />
                      <bt:Image size="40" resid="Icon.40x40" />
                      <bt:Image size="48" resid="Icon.48x48" />
                      <bt:Image size="64" resid="Icon.64x64" />
                      <bt:Image size="80" resid="Icon.80x80" />
                      <bt:Image size="96" resid="Icon.96x96" />
                      <bt:Image size="128" resid="Icon.128x128" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Extension point for read -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadGroup">
                  <Label resid="GroupLabel" />
                  <Control xsi:type="Button" id="msgReadOpenPaneButton">
                    <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="20" resid="Icon.20x20" />
                      <bt:Image size="24" resid="Icon.24x24" />
                      <bt:Image size="32" resid="Icon.32x32" />
                      <bt:Image size="40" resid="Icon.40x40" />
                      <bt:Image size="48" resid="Icon.48x48" />
                      <bt:Image size="64" resid="Icon.64x64" />
                      <bt:Image size="80" resid="Icon.80x80" />
                      <bt:Image size="96" resid="Icon.96x96" />
                      <bt:Image size="128" resid="Icon.128x128" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>

          <MobileFormFactor>
            <FunctionFile resid="JSRuntime.Url" />

            <!-- Extension point for mobile event-based activation -->
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageCompose" />
                <LaunchEvent Type="OnMessageRecipientsChanged" FunctionName="onMessageRecipientsChanged" />
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url" />
            </ExtensionPoint>

            <!-- Extension point for mobile taskpane button (compose) -->
            <ExtensionPoint xsi:type="MobileMessageComposeCommandSurface">
              <Group id="mobileMsgComposeGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="MobileButton" id="mobileMsgComposeOpenPaneButton">
                  <Label resid="TaskpaneButton.Label" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="Icon.25x25" />
                    <bt:Image size="25" scale="2" resid="Icon.50x50" />
                    <bt:Image size="25" scale="3" resid="Icon.75x75" />
                    <bt:Image size="32" scale="1" resid="Icon.32x32" />
                    <bt:Image size="32" scale="2" resid="Icon.64x64" />
                    <bt:Image size="32" scale="3" resid="Icon.96x96" />
                    <bt:Image size="48" scale="1" resid="Icon.48x48" />
                    <bt:Image size="48" scale="2" resid="Icon.96x96" />
                    <bt:Image size="48" scale="3" resid="Icon.144x144" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>

            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="mobileMsgReadGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="MobileButton" id="mobileMsgReadOpenPaneButton">
                  <Label resid="TaskpaneButton.Label" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="Icon.25x25" />
                    <bt:Image size="25" scale="2" resid="Icon.50x50" />
                    <bt:Image size="25" scale="3" resid="Icon.75x75" />
                    <bt:Image size="32" scale="1" resid="Icon.32x32" />
                    <bt:Image size="32" scale="2" resid="Icon.64x64" />
                    <bt:Image size="32" scale="3" resid="Icon.96x96" />
                    <bt:Image size="48" scale="1" resid="Icon.48x48" />
                    <bt:Image size="48" scale="2" resid="Icon.96x96" />
                    <bt:Image size="48" scale="3" resid="Icon.144x144" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>

        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-16.png" />
          <bt:Image id="Icon.25x25"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-25.png" />
          <bt:Image id="Icon.50x50"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-50.png" />
          <bt:Image id="Icon.75x75"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-75.png" />
          <bt:Image id="Icon.20x20"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-20.png" />
          <bt:Image id="Icon.24x24"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-24.png" />
          <bt:Image id="Icon.32x32"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-32.png" />
          <bt:Image id="Icon.40x40"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-40.png" />
          <bt:Image id="Icon.48x48"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-48.png" />
          <bt:Image id="Icon.64x64"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-64.png" />
          <bt:Image id="Icon.80x80"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-80.png" />
          <bt:Image id="Icon.96x96"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-96.png" />
          <bt:Image id="Icon.128x128"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-128.png" />
          <bt:Image id="Icon.144x144"
            DefaultValue="https://outlook.touchandcontact.com/assets/icon-144.png" />
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url"
            DefaultValue="https://outlook.touchandcontact.com/taskpane.html" />
          <bt:Url id="WebViewRuntime.Url"
            DefaultValue="https://outlook.touchandcontact.com/commands.html" />
          <bt:Url id="JSRuntime.Url"
            DefaultValue="https://outlook.touchandcontact.com/commands.js" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="TAC Signature" />
          <bt:String id="TaskpaneButton.Label" DefaultValue="Show Signature" />
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open signature panel" />
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>

</OfficeApp>
