<?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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">

  <!--
    komplai for Office — covers Word, PowerPoint and Excel from one
    manifest. Outlook needs its own file (outlook-manifest.xml): mail
    add-ins use the MailApp schema, which cannot be expressed here.

    Per-tenant manifests are emitted by the build script from
    manifest/tenants/<tenant>.json. Do not hand-edit per-tenant manifests.
  -->

  <Id>f82811e2-b9f3-4dc8-ac26-cf237b0d6ced</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>[TEST] Progressify ApS</ProviderName>
  <DefaultLocale>da-DK</DefaultLocale>

  <DisplayName DefaultValue="[TEST] komplai for Office">
    <Override Locale="en-US" Value="[TEST] komplai for Office"/>
  </DisplayName>
  <Description DefaultValue="Skabeloner, anonymisering, bindinger, standarder og rapport-regenerering — alle komplai-værktøjer fra én knap.">
    <Override Locale="en-US" Value="Templates, redaction, bindings, standards and report regeneration — all komplai tools from one button."/>
  </Description>

  <IconUrl DefaultValue="https://docs.test.komplai.dk/word-icons/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://docs.test.komplai.dk/word-icons/icon-128.png"/>
  <SupportUrl DefaultValue="https://komplai.dk/support"/>

  <AppDomains>
    <AppDomain>https://komplai.dk</AppDomain>
    <AppDomain>https://addin.komplai.dk</AppDomain>
    <!-- Zitadel OIDC dialogs. Office requires every host the dialog
         popup navigates to or the taskpane fetches to be declared here. -->
    <AppDomain>https://auth.test.komplai.dk</AppDomain>
    <AppDomain>https://auth.komplai.dk</AppDomain>
    <!-- komplai API gateway (Fastify, services/api). Word taskpane
         calls /v1/redact/detect with the bearer token. -->
    <AppDomain>https://api.test.komplai.dk</AppDomain>
    <AppDomain>https://api.komplai.dk</AppDomain>
    <!-- The taskpane URL itself — Word loads docs.<env>.komplai.dk/embed/tools
         on add-in activation. Same-origin fetches inside don't strictly
         need AppDomain entries, but listing the host explicitly is the
         Office-recommended pattern for the SourceLocation origin. -->
    <AppDomain>https://docs.test.komplai.dk</AppDomain>
    <AppDomain>https://docs.komplai.dk</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Document"/>
    <Host Name="Presentation"/>
    <Host Name="Workbook"/>
  </Hosts>

  <!--
    No <Requirements> element, deliberately.

    This manifest covers Word, PowerPoint AND Excel. A requirement set is
    evaluated by every host that reads the manifest, so the old
    `WordApi 1.5` floor made PowerPoint and Excel report "no supported
    platforms" and refuse the add-in outright. An empty <Sets/> is not a
    way out either — the schema requires at least one <Set> child, and
    office-addin-manifest rejects it.

    The floor it used to express (WordApi 1.5, needed by linked-fields'
    `Word.ContentControl.onDataChanged`) is now enforced at runtime: the
    linked-fields tile checks
    `Office.context.requirements.isSetSupported("WordApi", "1.5")` and
    surfaces a "version too old" message on click — which is what it
    already did for older Word builds. Redaction, the only module offered
    in PowerPoint and Excel, needs nothing beyond the base API.
  -->

  <DefaultSettings>
    <SourceLocation DefaultValue="https://docs.test.komplai.dk/embed/tools"/>
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <CustomTab id="komplai.test.tab">
              <Group id="komplai.test.compliance.group">
                <Label resid="Group.Label"/>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>

                <Control xsi:type="Button" id="komplai.test.scan.button">
                  <Label resid="ScanButton.Label"/>
                  <Supertip>
                    <Title resid="ScanButton.Title"/>
                    <Description resid="ScanButton.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">
                    <TaskpaneId>komplai.test.taskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
              <Label resid="Tab.Label"/>
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
      <Host xsi:type="Presentation">
        <DesktopFormFactor>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <CustomTab id="komplai.test.tab">
              <Group id="komplai.test.compliance.group">
                <Label resid="Group.Label"/>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>

                <Control xsi:type="Button" id="komplai.test.scan.button">
                  <Label resid="ScanButton.Label"/>
                  <Supertip>
                    <Title resid="ScanButton.Title"/>
                    <Description resid="ScanButton.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">
                    <TaskpaneId>komplai.test.taskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
              <Label resid="Tab.Label"/>
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
      <Host xsi:type="Workbook">
        <DesktopFormFactor>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <CustomTab id="komplai.test.tab">
              <Group id="komplai.test.compliance.group">
                <Label resid="Group.Label"/>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>

                <Control xsi:type="Button" id="komplai.test.scan.button">
                  <Label resid="ScanButton.Label"/>
                  <Supertip>
                    <Title resid="ScanButton.Title"/>
                    <Description resid="ScanButton.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">
                    <TaskpaneId>komplai.test.taskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
              <Label resid="Tab.Label"/>
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://docs.test.komplai.dk/word-icons/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://docs.test.komplai.dk/word-icons/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://docs.test.komplai.dk/word-icons/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://docs.test.komplai.dk/embed/tools"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Tab.Label" DefaultValue="[TEST] komplai">
          <bt:Override Locale="en-US" Value="[TEST] komplai"/>
        </bt:String>
        <bt:String id="Group.Label" DefaultValue="Compliance">
          <bt:Override Locale="en-US" Value="Compliance"/>
        </bt:String>
        <bt:String id="ScanButton.Label" DefaultValue="Åbn komplai">
          <bt:Override Locale="en-US" Value="Open komplai"/>
        </bt:String>
        <bt:String id="ScanButton.Title" DefaultValue="komplai-værktøjer">
          <bt:Override Locale="en-US" Value="komplai tools"/>
        </bt:String>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="ScanButton.Tooltip" DefaultValue="Anonymisering, skabeloner, standardgennemgang og rapport-regenerering — vælg værktøj i ruden.">
          <bt:Override Locale="en-US" Value="Redaction, templates, standards walkthrough and report regeneration — pick a tool in the pane."/>
        </bt:String>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
