<?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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
           xsi:type="TaskPaneApp">
  <Id>7c3f8d2a-9b4e-4a1c-8e5f-6d2b9c8a7e4f</Id>
  <Version>0.2.0.0</Version>
  <ProviderName>PlotLens</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="PlotLens" />
  <Description DefaultValue="AI-powered narrative intelligence for writers. Validate continuity, explore entities, and search your canon — right inside Word." />
  <IconUrl DefaultValue="https://microsoft.plotlens.ai/assets/icon-plotlens-32.png" />
  <HighResolutionIconUrl DefaultValue="https://microsoft.plotlens.ai/assets/icon-plotlens-64.png" />
  <SupportUrl DefaultValue="https://plotlens.ai/support/word-addin" />

  <!-- Production domains for API and web app access -->
  <AppDomains>
    <AppDomain>https://plotlens.ai</AppDomain>
    <AppDomain>https://app.plotlens.ai</AppDomain>
    <AppDomain>https://api.plotlens.ai</AppDomain>
    <AppDomain>https://microsoft.plotlens.ai</AppDomain>
  </AppDomains>

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

  <Requirements>
    <Sets>
      <Set Name="WordApi" MinVersion="1.5" />
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://microsoft.plotlens.ai/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.1">
        <bt:Set Name="SharedRuntime" MinVersion="1.1" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="Document">
        <Runtimes>
          <Runtime resid="Taskpane.Url" lifetime="long" />
        </Runtimes>
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>

          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="PlotLensGroup">
                <Label resid="CommandsGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="IconPlotLens.16x16" />
                  <bt:Image size="32" resid="IconPlotLens.32x32" />
                  <bt:Image size="80" resid="IconPlotLens.80x80" />
                </Icon>

                <!-- Primary button: opens the taskpane -->
                <Control xsi:type="Button" id="PlotLens.ShowTaskpane">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="IconPlotLens.16x16" />
                    <bt:Image size="32" resid="IconPlotLens.32x32" />
                    <bt:Image size="80" resid="IconPlotLens.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>PlotLensTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <!-- PlotLens brand icon (group + Open PlotLens button) -->
        <bt:Image id="IconPlotLens.16x16" DefaultValue="https://microsoft.plotlens.ai/assets/icon-plotlens-16.png" />
        <bt:Image id="IconPlotLens.32x32" DefaultValue="https://microsoft.plotlens.ai/assets/icon-plotlens-32.png" />
        <bt:Image id="IconPlotLens.80x80" DefaultValue="https://microsoft.plotlens.ai/assets/icon-plotlens-80.png" />
      </bt:Images>

      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://microsoft.plotlens.ai/taskpane.html" />
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://plotlens.ai/docs/word-addin" />
      </bt:Urls>

      <bt:ShortStrings>
        <bt:String id="GetStarted.Title" DefaultValue="Get started with PlotLens" />
        <bt:String id="CommandsGroup.Label" DefaultValue="PlotLens" />
        <bt:String id="TaskpaneButton.Label" DefaultValue="PlotLens" />
      </bt:ShortStrings>

      <bt:LongStrings>
        <bt:String id="GetStarted.Description" DefaultValue="Open the PlotLens task pane to validate your narrative against established canon." />
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open the PlotLens task pane to validate continuity, explore entities, and search your canon." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
