<?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"
  xsi:type="MailApp"
>
  <Id>a6f51c47-8c5b-4f8d-b0d2-8f3c1e8f0c55</Id>
  <Version>0.1.0.2</Version>

  <ProviderName>Conbool</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>

  <DisplayName DefaultValue="Conbool SecureFiles"/>
  <Description DefaultValue="Secure large file exchange from Outlook.">
    <Override Locale="de-DE" Value="Sicherer Datei-Austausch großer Dateien direkt aus Outlook."/>
  </Description>

  <IconUrl DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-80.png"/>
  <SupportUrl DefaultValue="https://conbool.com/contact"/>

  <AppDomains>
    <AppDomain>https://conbool.com</AppDomain>
  </AppDomains>

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

  <!-- Top-Level Minimum: Mailbox 1.5 (Compose-Taskpane).
       Der V1_1-Block fordert höher (1.12 für OnMessageSend), Outlook-
       Clients zwischen 1.5 und 1.11 fallen auf den V1_0-Block zurück
       und kriegen das Add-in ohne LaunchEvent (alte Verhalten, keine
       OnSend-Kopplung). -->
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.5"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://conbool.com/office-addins/lfe/taskpane.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

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

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">

    <!-- V1_0 Fallback: nur Compose-Button + Taskpane, kein LaunchEvent.
         Outlook-Clients <1.12 nutzen diesen Block — der OnSend-Hook
         entfällt für sie (Verhalten = wie vor diesem Release). -->
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="lfeGroup">
                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="lfeComposeBtn">
                  <Label resid="BtnLabel"/>
                  <Supertip>
                    <Title resid="BtnTooltipTitle"/>
                    <Description resid="BtnTooltipDesc"/>
                  </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="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon16" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-16.png"/>
        <bt:Image id="Icon32" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-32.png"/>
        <bt:Image id="Icon80" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.html"/>
        <bt:Url id="Taskpane.Url" DefaultValue="https://conbool.com/office-addins/lfe/taskpane.html"/>
        <bt:Url id="WebViewRuntime.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.html"/>
        <bt:Url id="JSRuntime.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.js"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Conbool SecureFiles"/>
        <bt:String id="BtnLabel" DefaultValue="Large File">
          <bt:Override Locale="de-DE" Value="Große Datei"/>
        </bt:String>
        <bt:String id="BtnTooltipTitle" DefaultValue="Secure File Transfer">
          <bt:Override Locale="de-DE" Value="Sicherer Datei-Transfer"/>
        </bt:String>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="BtnTooltipDesc" DefaultValue="Attach files up to 10 GB via an encrypted download link.">
          <bt:Override Locale="de-DE" Value="Hängen Sie Dateien bis 10 GB sicher über einen verschlüsselten Link an diese Mail an."/>
        </bt:String>
      </bt:LongStrings>
    </Resources>

    <!-- V1_1: Modern Outlook (Mailbox >= 1.12) — bringt LaunchEvents
         für OnNewMessageCompose und OnMessageSend (Smart Alerts /
         PromptUser). Der OnSend-Hook ist der eigentliche Trigger für
         /api/securefiles/addin/commit, der die Empfänger-Link-Mail
         aus dem Idle-Zustand holt und dispatchen lässt. -->
    <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>
            <Runtime resid="WebViewRuntime.Url" lifetime="short">
              <Override type="javascript" resid="JSRuntime.Url"/>
            </Runtime>
          </Runtimes>

          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>

            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="lfeGroup">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="lfeComposeBtn">
                    <Label resid="BtnLabel"/>
                    <Supertip>
                      <Title resid="BtnTooltipTitle"/>
                      <Description resid="BtnTooltipDesc"/>
                    </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="Taskpane.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="lfeOnComposeHandler"/>
                <LaunchEvent Type="OnMessageSend" FunctionName="lfeOnMessageSendHandler" SendMode="PromptUser"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>

          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon16" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-16.png"/>
          <bt:Image id="Icon32" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-32.png"/>
          <bt:Image id="Icon80" DefaultValue="https://conbool.com/office-addins/lfe/icons/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.html"/>
          <bt:Url id="Taskpane.Url" DefaultValue="https://conbool.com/office-addins/lfe/taskpane.html"/>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.html"/>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://conbool.com/office-addins/lfe/commands.js"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="Conbool SecureFiles"/>
          <bt:String id="BtnLabel" DefaultValue="Large File">
            <bt:Override Locale="de-DE" Value="Große Datei"/>
          </bt:String>
          <bt:String id="BtnTooltipTitle" DefaultValue="Secure File Transfer">
            <bt:Override Locale="de-DE" Value="Sicherer Datei-Transfer"/>
          </bt:String>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="BtnTooltipDesc" DefaultValue="Attach files up to 10 GB via an encrypted download link.">
            <bt:Override Locale="de-DE" Value="Hängen Sie Dateien bis 10 GB sicher über einen verschlüsselten Link an diese Mail an."/>
          </bt:String>
        </bt:LongStrings>
      </Resources>

      <WebApplicationInfo>
        <Id>6b101597-cb44-4013-8f23-c12acfeba80e</Id>
        <Resource>api://conbool.com/6b101597-cb44-4013-8f23-c12acfeba80e</Resource>
        <Scopes>
          <Scope>User.Read</Scope>
          <Scope>profile</Scope>
          <Scope>openid</Scope>
        </Scopes>
      </WebApplicationInfo>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
