<?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>b8e3c12f-4d5a-4c8b-9e2f-1a3b5c7d9e0f</Id>
  <Version>1.2.0.0</Version>
  <ProviderName>Attorly AI</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Attorly AI Legal Assistant"/>
  <Description DefaultValue="Review contracts with tracked-change redlines, ask questions with paragraph citations, fill statute-verified legal templates, and insert approved clauses - without leaving Word. Built for lawyers and legal teams on the Attorly AI legal platform."/>

  <IconUrl DefaultValue="https://attorly.ai/word-addin/assets/icons/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://attorly.ai/word-addin/assets/icons/icon-64.png"/>
  <SupportUrl DefaultValue="https://attorly.ai/support"/>

  <AppDomains>
    <AppDomain>https://attorly.ai</AppDomain>
    <AppDomain>https://app.attorly.ai</AppDomain>
  </AppDomains>

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

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

  <DefaultSettings>
    <SourceLocation DefaultValue="https://attorly.ai/word-addin/taskpane.html"/>
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

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

      <Requirements>
        <bt:Sets DefaultMinVersion="1.3">
          <bt:Set Name="WordApi"/>
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="Document">
          <DesktopFormFactor>

            <FunctionFile resid="Commands.Url"/>

            <ExtensionPoint xsi:type="PrimaryCommandSurface">
              <CustomTab id="AttorlyTab">
                <Group id="ClauseGroup">
                  <Label resid="ClauseGroup.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="ReviewContractBtn">
                    <Label resid="ReviewContract.Label"/>
                    <Supertip>
                      <Title resid="ReviewContract.Title"/>
                      <Description resid="ReviewContract.Desc"/>
                    </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>AttorlyPane</TaskpaneId>
                      <SourceLocation resid="Review.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="AskDocumentBtn">
                    <Label resid="AskDocument.Label"/>
                    <Supertip>
                      <Title resid="AskDocument.Title"/>
                      <Description resid="AskDocument.Desc"/>
                    </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>AttorlyPane</TaskpaneId>
                      <SourceLocation resid="Ask.Url"/>
                    </Action>
                  </Control>
                  <Control xsi:type="Button" id="FillTemplateBtn">
                    <Label resid="FillTemplate.Label"/>
                    <Supertip>
                      <Title resid="FillTemplate.Title"/>
                      <Description resid="FillTemplate.Desc"/>
                    </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>AttorlyPane</TaskpaneId>
                      <SourceLocation resid="Templates.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="InsertClauseBtn">
                    <Label resid="InsertClause.Label"/>
                    <Supertip>
                      <Title resid="InsertClause.Title"/>
                      <Description resid="InsertClause.Desc"/>
                    </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>AttorlyPane</TaskpaneId>
                      <SourceLocation resid="Taskpane.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="TrackOutcomesBtn">
                    <Label resid="TrackOutcomes.Label"/>
                    <Supertip>
                      <Title resid="TrackOutcomes.Title"/>
                      <Description resid="TrackOutcomes.Desc"/>
                    </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="ExecuteFunction">
                      <FunctionName>scanForModifications</FunctionName>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="ViewAnalyticsBtn">
                    <Label resid="ViewAnalytics.Label"/>
                    <Supertip>
                      <Title resid="ViewAnalytics.Title"/>
                      <Description resid="ViewAnalytics.Desc"/>
                    </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>AttorlyPane</TaskpaneId>
                      <SourceLocation resid="Analytics.Url"/>
                    </Action>
                  </Control>

                </Group>
                <Label resid="AttorlyTab.Label"/>
              </CustomTab>
            </ExtensionPoint>

            <ExtensionPoint xsi:type="ContextMenu">
              <OfficeMenu id="ContextMenuText">
                <Control xsi:type="Button" id="SaveAsClauseCtx">
                  <Label resid="SaveAsClause.Label"/>
                  <Supertip>
                    <Title resid="SaveAsClause.Title"/>
                    <Description resid="SaveAsClause.Desc"/>
                  </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="ExecuteFunction">
                    <FunctionName>saveSelectionAsClause</FunctionName>
                  </Action>
                </Control>
              </OfficeMenu>
            </ExtensionPoint>

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

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://attorly.ai/word-addin/assets/icons/icon-16.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://attorly.ai/word-addin/assets/icons/icon-32.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://attorly.ai/word-addin/assets/icons/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://attorly.ai/word-addin/taskpane.html"/>
          <bt:Url id="Review.Url" DefaultValue="https://attorly.ai/word-addin/taskpane.html#/review"/>
          <bt:Url id="Ask.Url" DefaultValue="https://attorly.ai/word-addin/taskpane.html#/ask"/>
          <bt:Url id="Templates.Url" DefaultValue="https://attorly.ai/word-addin/taskpane.html#/templates"/>
          <bt:Url id="Analytics.Url" DefaultValue="https://attorly.ai/word-addin/taskpane.html#/analytics"/>
          <bt:Url id="Commands.Url" DefaultValue="https://attorly.ai/word-addin/commands.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="AttorlyTab.Label" DefaultValue="Attorly AI"/>
          <bt:String id="ClauseGroup.Label" DefaultValue="Contract Tools"/>
          <bt:String id="ReviewContract.Label" DefaultValue="Review"/>
          <bt:String id="AskDocument.Label" DefaultValue="Ask"/>
          <bt:String id="FillTemplate.Label" DefaultValue="Templates"/>
          <bt:String id="InsertClause.Label" DefaultValue="Clauses"/>
          <bt:String id="TrackOutcomes.Label" DefaultValue="Track"/>
          <bt:String id="ViewAnalytics.Label" DefaultValue="Analytics"/>
          <bt:String id="SaveAsClause.Label" DefaultValue="Save as Clause"/>
          <bt:String id="ReviewContract.Title" DefaultValue="AI Contract Review"/>
          <bt:String id="AskDocument.Title" DefaultValue="Ask About Document"/>
          <bt:String id="FillTemplate.Title" DefaultValue="Fill a Legal Template"/>
          <bt:String id="InsertClause.Title" DefaultValue="Insert Clause from Library"/>
          <bt:String id="TrackOutcomes.Title" DefaultValue="Scan for Modifications"/>
          <bt:String id="ViewAnalytics.Title" DefaultValue="View Clause Analytics"/>
          <bt:String id="SaveAsClause.Title" DefaultValue="Save Selection as Clause"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="ReviewContract.Desc" DefaultValue="AI-powered full contract review with risk scoring, redline suggestions, and missing clause detection."/>
          <bt:String id="AskDocument.Desc" DefaultValue="Ask questions about the current document. Get instant analysis of risks, terms, and market comparisons."/>
          <bt:String id="FillTemplate.Desc" DefaultValue="Browse the template gallery, fill in the fields with your firm details prefilled, and insert the finished document at the cursor or as a new document."/>
          <bt:String id="InsertClause.Desc" DefaultValue="Browse and insert clauses from your organization's clause library with full tracking."/>
          <bt:String id="TrackOutcomes.Desc" DefaultValue="Scan the document for modified clauses and record negotiation outcomes."/>
          <bt:String id="ViewAnalytics.Desc" DefaultValue="View performance analytics for clauses in your library."/>
          <bt:String id="SaveAsClause.Desc" DefaultValue="Save the selected text as a new clause in your library."/>
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
