<?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"
  xsi:type="TaskPaneApp">

  <Id>a2f9c3e1-7b4d-4f8a-9d2e-1c5b8a3f6e7d</Id>
  <Version>2026.5.13.1</Version>
  <ProviderName>TotalDealer</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="TotalDealer Excel Add-in" />
  <Description DefaultValue="Updates data from the data warehouse." />
  <IconUrl DefaultValue="https://ea01.totaldealer.net/assets/icon-80.png" />
  <HighResolutionIconUrl DefaultValue="https://ea01.totaldealer.net/assets/icon-80.png" />
  <SupportUrl DefaultValue="https://totaldealer.com" />

  <AppDomains>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
    <AppDomain>https://ftapis.azurewebsites.net</AppDomain>
  </AppDomains>

  <Requirements>
    <Sets>
      <Set Name="ExcelApi" MinVersion="1.1"/>
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://ea01.totaldealer.net/commands.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">
            <CustomTab id="TDUpdateTab">
              <Group id="TDUpdateGroup">
                <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>
                <!--
                  A Menu control renders as a dropdown button in the ribbon.
                  "Update" button → dropdown → "Update Data" item.
                -->
                <Control xsi:type="Menu" id="TDUpdateMenu">
                  <Label resid="Menu.Label"/>
                  <Supertip>
                    <Title resid="Menu.Label"/>
                    <Description resid="Menu.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>
                  <Items>
                    <Item id="TDUpdateDataItem">
                      <Label resid="UpdateData.Label"/>
                      <Supertip>
                        <Title resid="UpdateData.Label"/>
                        <Description resid="UpdateData.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="ExecuteFunction">
                        <FunctionName>updateData</FunctionName>
                      </Action>
                    </Item>
                    <Item id="TDSettingsItem">
                      <Label resid="Settings.Label"/>
                      <Supertip>
                        <Title resid="Settings.Label"/>
                        <Description resid="Settings.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>SettingsTaskpane</TaskpaneId>
                        <SourceLocation resid="Settings.Url"/>
                      </Action>
                    </Item>
                  </Items>
                </Control>
              </Group>
              <Label resid="Tab.Label"/>
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://ea01.totaldealer.net/assets/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://ea01.totaldealer.net/assets/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://ea01.totaldealer.net/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://ea01.totaldealer.net/commands.html"/>
        <bt:Url id="Settings.Url" DefaultValue="https://ea01.totaldealer.net/settings.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Tab.Label"         DefaultValue="Update"/>
        <bt:String id="Group.Label"       DefaultValue="Inventory"/>
        <bt:String id="Menu.Label"        DefaultValue="Update"/>
        <bt:String id="UpdateData.Label"  DefaultValue="Update Data"/>
        <bt:String id="Settings.Label"    DefaultValue="Settings"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Menu.Tooltip"       DefaultValue="Inventory update actions"/>
        <bt:String id="UpdateData.Tooltip" DefaultValue="Fetch and update inventory data for this workbook"/>
        <bt:String id="Settings.Tooltip"   DefaultValue="Configure API code and endpoint"/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
