<?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">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id>f9856e33-1e21-48b7-817d-69c154c1834d</Id>

  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>2.1.0</Version>

  <ProviderName>Newforma Project Center</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Newforma Project Center" />
  <Description DefaultValue="File your emails to Newforma project folders"/>

  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-64x64-new.png" />
  <HighResolutionIconUrl DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-128x128-new.png"/>

  <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
  <SupportUrl DefaultValue="http://www.newforma.com" />

  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
  <AppDomains>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
    <AppDomain>https://newforma.cloud</AppDomain>
    <AppDomain>https://prod.newforma.cloud</AppDomain>
    <AppDomain>https://api.newforma.cloud</AppDomain>
  </AppDomains>
  <!--End Basic Settings. -->

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.12" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook-web-addin.newforma.cloud/index.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
      <TabletSettings>
        <SourceLocation DefaultValue="https://outlook-web-addin.newforma.cloud/index.html" />
        <RequestedHeight>250</RequestedHeight>
      </TabletSettings>
      <PhoneSettings>
        <SourceLocation DefaultValue="https://outlook-web-addin.newforma.cloud/index.html" />
      </PhoneSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</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>
          <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
          <!--<FunctionFile resid="functionFile" />-->

          <!-- Message Read -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
            <OfficeTab id="TabDefault">
              <!-- Up to 6 Groups added per Tab -->
              <Group id="msgReadGroup">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="paneReadButtonLabel" />
                  <Supertip>
                    <Title resid="paneReadSuperTipTitle" />
                    <Description resid="paneReadSuperTipDescription" />
                  </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="fileEmailTaskPaneUrl" />
                  </Action>
                </Control>
                <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <!-- Compose Buttons -->
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <!-- OfficeTab Definition -->
              <Group id="msgComposeGroup">
                <Label resid="groupLabel"/>
                <Control xsi:type="Button" id="sendAndFileButton">
                  <Label resid="sendAndFileButtonLabel" />
                  <Supertip>
                    <Title resid="sendAndFileSuperTipTitle" />
                    <Description resid="sendAndFileSuperTipDescription" />
                  </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="sendAndFileTaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="icon16" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-16x16-new.png"/>
        <bt:Image id="icon32" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-32x32-new.png"/>
        <bt:Image id="icon80" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-80x80-new.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="fileEmailTaskPaneUrl" DefaultValue="https://outlook-web-addin.newforma.cloud/index.html#fileemail"/>
        <bt:Url id="sendAndFileTaskPaneUrl" DefaultValue="https://outlook-web-addin.newforma.cloud/index.html#sendandfile"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Newforma Project Center"/>
        <bt:String id="customTabLabel"  DefaultValue="Newforma Project Center"/>
        <bt:String id="paneReadButtonLabel" DefaultValue="Newforma Project Center"/>
        <bt:String id="paneReadSuperTipTitle" DefaultValue="Newforma Project Center"/>

        <bt:String id="sendAndFileButtonLabel" DefaultValue="Newforma Project Center"/>
        <bt:String id="sendAndFileSuperTipTitle" DefaultValue="Newforma Project Center"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="paneReadSuperTipDescription" DefaultValue="Newforma Project Center"/>
        <bt:String id="sendAndFileSuperTipDescription" DefaultValue="Newforma Project Center"/>
      </bt:LongStrings>
    </Resources>

    <!-- VersionOverrides for the v1.1 schema -->

    <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">
        <Runtimes>
          <!-- HTML file including reference to or inline JavaScript event handlers.
               This is used by Outlook on the web and on the new Mac UI, and new Outlook on Windows. -->
          <Runtime resid="WebViewRuntime.Url">
            <!-- JavaScript file containing event handlers. This is used by classic Outlook on Windows. -->
            <Override type="javascript" resid="JSRuntime.Url"/>
          </Runtime>
          <Runtime resid="SmartAlertRuntime.Url">
            <Override type="javascript" resid="JSRuntime.Url"/> 
          </Runtime>
        </Runtimes>
          <DesktopFormFactor>
            <!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
            <FunctionFile resid="JSRuntime.Url" />
            <!-- Message Read -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
              <OfficeTab id="TabDefault">
                <!-- Up to 6 Groups added per Tab -->
                <Group id="msgReadGroup">
                  <Label resid="groupLabel" />
                  <!-- Launch the add-in : task pane button -->
                  <Control xsi:type="Button" id="msgReadOpenPaneButton">
                    <Label resid="paneReadButtonLabel" />
                    <Supertip>
                      <Title resid="paneReadSuperTipTitle" />
                      <Description resid="paneReadSuperTipDescription" />
                    </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="fileEmailTaskPaneUrl" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                  <!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Compose Buttons -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <!-- OfficeTab Definition -->
                <Group id="msgComposeGroup">
                  <Label resid="groupLabel"/>
                  <Control xsi:type="Button" id="sendAndFileButton">
                    <Label resid="sendAndFileButtonLabel" />
                    <Supertip>
                      <Title resid="sendAndFileSuperTipTitle" />
                      <Description resid="sendAndFileSuperTipDescription" />
                    </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="sendAndFileTaskPaneUrl" />
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler"/>
              </LaunchEvents>
              <!-- Identify the runtime to be used (also referenced by the Runtime element). -->
              <SourceLocation resid="SmartAlertRuntime.Url"/>
            </ExtensionPoint>
          </DesktopFormFactor>
          <MobileFormFactor>
            <!-- Message Read -->
            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="mobileMsgRead">
                <Label resid="groupLabel" />
                <!-- Launch the add-in : task pane button -->
                <Control xsi:type="MobileButton" id="MobileTaskPaneBtn">
                  <Label resid="paneReadButtonLabel" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="icon16" />
                    <bt:Image size="25" scale="2" resid="icon16" />
                    <bt:Image size="25" scale="3" resid="icon16" />
                    <bt:Image size="32" scale="1" resid="icon32" />
                    <bt:Image size="32" scale="2" resid="icon32" />
                    <bt:Image size="32" scale="3" resid="icon32" />
                    <bt:Image size="48" scale="1" resid="icon32" />
                    <bt:Image size="48" scale="2" resid="icon32" />
                    <bt:Image size="48" scale="3" resid="icon32" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="fileEmailTaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="icon16" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-16x16-new.png"/>
          <bt:Image id="icon32" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-32x32-new.png"/>
          <bt:Image id="icon80" DefaultValue="https://outlook-web-addin.newforma.cloud/assets/newforma-logo-80x80-new.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="fileEmailTaskPaneUrl" DefaultValue="https://outlook-web-addin.newforma.cloud/index.html#fileemail"/>
          <bt:Url id="sendAndFileTaskPaneUrl" DefaultValue="https://outlook-web-addin.newforma.cloud/index.html#sendandfile"/>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://outlook-web-addin.newforma.cloud/index.html" />
          <!-- Entry needed for classic Outlook on Windows. -->
          <bt:Url id="JSRuntime.Url" DefaultValue="https://outlook-web-addin.newforma.cloud/launchevent.js" />
          <!-- Entry for Web/new versions-->
          <bt:Url id="SmartAlertRuntime.Url" DefaultValue="https://outlook-web-addin.newforma.cloud/commands.html" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="Newforma Project Center"/>
          <bt:String id="customTabLabel"  DefaultValue="Newforma Project Center"/>
          <bt:String id="paneReadButtonLabel" DefaultValue="Newforma Project Center"/>
          <bt:String id="paneReadSuperTipTitle" DefaultValue="Newforma Project Center"/>
          <bt:String id="sendAndFileButtonLabel" DefaultValue="Newforma Project Center"/>
          <bt:String id="sendAndFileSuperTipTitle" DefaultValue="Newforma Project Center"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="paneReadSuperTipDescription" DefaultValue="Newforma Project Center"/>
          <bt:String id="sendAndFileSuperTipDescription" DefaultValue="Newforma Project Center"/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
