<?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>2a0840b6-1fd2-41c5-b93d-e212dc50b60f</Id>
  <Version>2.1.0.0</Version>
  <ProviderName>mardicon</ProviderName>
  <DefaultLocale>de-DE</DefaultLocale>
  <DisplayName DefaultValue="MARDICON Outlook-Plugin"/>
  <Description DefaultValue="Verwaltet persönliche Signaturen und prüft das E-Mail-Format nach den freigegebenen Firmenregeln."/>
  <IconUrl DefaultValue="https://signatures.mardicon.de/assets/icon-64.png?v=mardicon-m-1"/>
  <HighResolutionIconUrl DefaultValue="https://signatures.mardicon.de/assets/icon-128.png?v=mardicon-m-1"/>
  <SupportUrl DefaultValue="https://mardicon.de"/>

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

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

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://signatures.mardicon.de/taskpane.html"/>
        <RequestedHeight>350</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://signatures.mardicon.de/taskpane.html"/>
      </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>

  <DisableEntityHighlighting>false</DisableEntityHighlighting>

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

      <!-- Mobile reports 1.5; later event APIs are client-specific exceptions. Runtime detects unavailable APIs. -->
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <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>
            <SupportsSharedFolders>true</SupportsSharedFolders>
            <FunctionFile resid="Commands.Url"/>

            <!-- Button beim Verfassen einer Mail -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="sigCommandGroup">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="sigTaskpaneButton">
                    <Label resid="TaskpaneButton.Label"/>
                    <Supertip>
                      <Title resid="TaskpaneButton.Label"/>
                      <Description resid="TaskpaneButton.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>

            <!-- Re-evaluate centrally managed signatures throughout compose. -->
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageComposeHandler"/>
                <LaunchEvent Type="OnMessageCompose" FunctionName="onMessageComposeHandler"/>
                <LaunchEvent Type="OnMessageRecipientsChanged" FunctionName="onMessageRecipientsChangedHandler"/>
                <LaunchEvent Type="OnMessageFromChanged" FunctionName="onMessageFromChangedHandler"/>
                <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler" SendMode="PromptUser"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>
          </DesktopFormFactor>
          <MobileFormFactor>
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="onNewMessageComposeHandler"/>
                <LaunchEvent Type="OnMessageRecipientsChanged" FunctionName="onMessageRecipientsChangedHandler"/>
                <LaunchEvent Type="OnMessageFromChanged" FunctionName="onMessageFromChangedHandler"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>
          </MobileFormFactor>

        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16" DefaultValue="https://signatures.mardicon.de/assets/icon-16.png?v=mardicon-m-1"/>
          <bt:Image id="Icon.32" DefaultValue="https://signatures.mardicon.de/assets/icon-32.png?v=mardicon-m-1"/>
          <bt:Image id="Icon.80" DefaultValue="https://signatures.mardicon.de/assets/icon-80.png?v=mardicon-m-1"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://signatures.mardicon.de/taskpane.html"/>
          <bt:Url id="Commands.Url" DefaultValue="https://signatures.mardicon.de/commands.html"/>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://signatures.mardicon.de/commands.html"/>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://signatures.mardicon.de/runtime.bundle.js"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="Group.Label" DefaultValue="MARDICON"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="MARDICON öffnen"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Signaturen verwalten und E-Mail-Format prüfen und angleichen."/>
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
