<?xml version="1.0" encoding="UTF-8"?>
<!--
  Halo for Outlook (Itplan). Add-in only-manifest. Fastgørelse (SupportsPinning) findes kun i schema v1.1, derfor kun i den indre blok.
  Add-in only-manifest, så det virker i klassisk og nyt Outlook på Windows,
  Outlook på Mac og Outlook på web. URL'erne peger på addin.itplan.dk; til test mod standardhostnavnet
  eller localhost laves en kopi med URL'erne skiftet ud (se CLAUDE.md, halo-outlook).
-->
<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>43307afd-07d1-41cb-bab5-f05c98db669b</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Itplan A/S</ProviderName>
  <DefaultLocale>da-DK</DefaultLocale>
  <DisplayName DefaultValue="Halo"/>
  <Description DefaultValue="Log mails på sager, salgsmuligheder og tilbud i Halo. Du logger ind i Halo med din egen konto, og kun det du selv vælger forlader Outlook."/>
  <IconUrl DefaultValue="https://addin.itplan.dk/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://addin.itplan.dk/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://addin.itplan.dk/"/>
  <AppDomains>
    <AppDomain>https://itplan.halopsa.com</AppDomain>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.8"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://addin.itplan.dk/taskpane.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://addin.itplan.dk/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>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.8">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="haloReadGroup">
                <Label resid="Group.Label"/>
                <Control xsi:type="Button" id="haloReadOpenPane">
                  <Label resid="Taskpane.Label"/>
                  <Supertip>
                    <Title resid="Taskpane.Label"/>
                    <Description resid="Taskpane.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="haloComposeGroup">
                <Label resid="Group.Label"/>
                <Control xsi:type="Button" id="haloComposeOpenPane">
                  <Label resid="Taskpane.Label"/>
                  <Supertip>
                    <Title resid="Taskpane.Label"/>
                    <Description resid="Taskpane.ComposeTooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://addin.itplan.dk/assets/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://addin.itplan.dk/assets/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://addin.itplan.dk/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://addin.itplan.dk/commands.html"/>
        <bt:Url id="Taskpane.Url" DefaultValue="https://addin.itplan.dk/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Group.Label" DefaultValue="Halo"/>
        <bt:String id="Taskpane.Label" DefaultValue="Halo"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Taskpane.Tooltip" DefaultValue="Log denne mail på en sag, salgsmulighed eller et tilbud i Halo."/>
        <bt:String id="Taskpane.ComposeTooltip" DefaultValue="Knyt den mail du skriver til en sag i Halo, så den logges når du sender."/>
      </bt:LongStrings>
    </Resources>

    <!-- Klienter med Mailbox 1.12 (nyt Outlook, web, Mac 16.65+, klassisk Windows 2206+) får også hændelserne:
         OnNewMessageCompose knytter svar i en logget samtale til sagen, OnMessageSend logger den afsendte mail. -->
    <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>
            <!-- commands.html bruges af Outlook på web, Mac og nyt Outlook; commands.js direkte af klassisk Outlook på Windows. -->
            <Runtime resid="WebViewRuntime.Url">
              <Override type="javascript" resid="JSRuntime.Url"/>
            </Runtime>
          </Runtimes>
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="haloReadGroup">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="haloReadOpenPane">
                    <Label resid="Taskpane.Label"/>
                    <Supertip>
                      <Title resid="Taskpane.Label"/>
                      <Description resid="Taskpane.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="haloComposeGroup">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="haloComposeOpenPane">
                    <Label resid="Taskpane.Label"/>
                    <Supertip>
                      <Title resid="Taskpane.Label"/>
                      <Description resid="Taskpane.ComposeTooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnNewMessageCompose" FunctionName="haloOnNewMessageCompose"/>
                <LaunchEvent Type="OnMessageSend" FunctionName="haloOnMessageSend" SendMode="PromptUser"/>
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url"/>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://addin.itplan.dk/assets/icon-16.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://addin.itplan.dk/assets/icon-32.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://addin.itplan.dk/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://addin.itplan.dk/commands.html"/>
          <bt:Url id="Taskpane.Url" DefaultValue="https://addin.itplan.dk/taskpane.html"/>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://addin.itplan.dk/commands.html"/>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://addin.itplan.dk/commands.js"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="Group.Label" DefaultValue="Halo"/>
          <bt:String id="Taskpane.Label" DefaultValue="Halo"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="Taskpane.Tooltip" DefaultValue="Log denne mail på en sag, salgsmulighed eller et tilbud i Halo."/>
          <bt:String id="Taskpane.ComposeTooltip" DefaultValue="Knyt den mail du skriver til en sag i Halo, så den logges når du sender."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
