<?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>d027a5a9-abab-4c84-bde7-c911b07eccc9</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>SYNTAX SYSTEMS</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Syntax Excel brAIn" />
  <Description DefaultValue="Chat-driven AI assistant inside Excel. Connects to a GenAI Studio agent that reads and writes the workbook via confirm-gated tool calls and pulls external data through NexusLink." />
  <IconUrl DefaultValue="https://office-brain.synhub.app/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://office-brain.synhub.app/assets/icon-80.png" />
  <SupportUrl DefaultValue="https://www.syntax.com" />

  <AppDomains>
    <AppDomain>https://office-brain.synhub.app</AppDomain>
  </AppDomains>

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

  <Requirements>
    <Sets DefaultMinVersion="1.7">
      <Set Name="ExcelApi" MinVersion="1.7" />
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://office-brain.synhub.app/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Workbook">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url" />

          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="SyntaxBrain.Group">
                <Label resid="Group.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16" />
                  <bt:Image size="32" resid="Icon.32" />
                  <bt:Image size="80" resid="Icon.80" />
                </Icon>

                <Control xsi:type="Button" id="SyntaxBrain.OpenTaskpane">
                  <Label resid="OpenButton.Label" />
                  <Supertip>
                    <Title resid="OpenButton.Label" />
                    <Description resid="OpenButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>SyntaxBrain.Taskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

                <Control xsi:type="Button" id="SyntaxBrain.ExplainSelection">
                  <Label resid="ExplainButton.Label" />
                  <Supertip>
                    <Title resid="ExplainButton.Label" />
                    <Description resid="ExplainButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>explainSelection</FunctionName>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://office-brain.synhub.app/assets/icon-16.png" />
        <bt:Image id="Icon.32" DefaultValue="https://office-brain.synhub.app/assets/icon-32.png" />
        <bt:Image id="Icon.80" DefaultValue="https://office-brain.synhub.app/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://office-brain.synhub.app/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://office-brain.synhub.app/taskpane.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Group.Label" DefaultValue="Syntax brAIn" />
        <bt:String id="OpenButton.Label" DefaultValue="Open brAIn" />
        <bt:String id="ExplainButton.Label" DefaultValue="Explain selection" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="OpenButton.Tooltip" DefaultValue="Open the Syntax Excel brAIn chat taskpane." />
        <bt:String id="ExplainButton.Tooltip" DefaultValue="Ask the brAIn to explain the currently selected range." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
