<?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 Word — PII redaction add-in (default tenant, dev sideload).
    Per-tenant manifests are emitted by the build script from
    manifest/tenants/<tenant>.json. Do not hand-edit per-tenant manifests.
  -->

  <Id>b8e1c4a0-7d92-4f3e-9a5b-0c1d2e3f4a5b</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>[PROD] Progressify ApS</ProviderName>
  <DefaultLocale>da-DK</DefaultLocale>

  <DisplayName DefaultValue="[PROD] komplai for Word">
    <Override Locale="en-US" Value="[PROD] komplai for Word"/>
  </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.komplai.dk/word-icons/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://docs.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"/>
  </Hosts>

  <Requirements>
    <!--
      WordApi 1.5 is the floor for the linked-fields module: the live two-way
      sync relies on `Word.ContentControl.onDataChanged` which lands in 1.5.
      Older Word versions can still use redaction, templates, etc., but the
      linked-fields tile will surface a "version too old" error on click.
    -->
    <Sets DefaultMinVersion="1.5">
      <Set Name="WordApi" MinVersion="1.5"/>
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://docs.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.prod.tab">
              <Group id="komplai.prod.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.prod.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.prod.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.komplai.dk/word-icons/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://docs.komplai.dk/word-icons/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://docs.komplai.dk/word-icons/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://docs.komplai.dk/embed/tools"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Tab.Label" DefaultValue="[PROD] komplai">
          <bt:Override Locale="en-US" Value="[PROD] 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>
