<?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">

  <!-- Basic add-in metadata -->
  <Id>a1b2c3d4-e5f6-7890-abcd-ef1234567890</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Kusto Datatable Converter</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Kusto Datatable"/>
  <Description DefaultValue="Convert Excel cells to Kusto datatable syntax"/>
  <IconUrl DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/assets/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/assets/icon-64.png"/>
  <SupportUrl DefaultValue="https://github.com/microsoft/excel-to-kusto-datatable"/>

  <!-- Hosts this add-in supports -->
  <Hosts>
    <Host Name="Workbook"/>
  </Hosts>

  <!-- API requirements -->
  <Requirements>
    <Sets>
      <Set Name="ExcelApi" MinVersion="1.1"/>
    </Sets>
  </Requirements>

  <!-- Default settings (fallback for older hosts) -->
  <DefaultSettings>
    <SourceLocation DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/taskpane.html"/>
  </DefaultSettings>

  <!-- Permissions -->
  <Permissions>ReadWriteDocument</Permissions>

  <!-- Version overrides for modern hosts with ribbon support -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Workbook">
        <DesktopFormFactor>
          <!-- Function file for potential future use -->
          <FunctionFile resid="Taskpane.Url"/>

          <!-- Add button to existing Data tab -->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabData">
              <Group id="KustoGroup">
                <Label resid="GroupLabel"/>
                <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="TaskpaneButton">
                  <Label resid="TaskpaneButton.Label"/>
                  <Supertip>
                    <Title resid="TaskpaneButton.Label"/>
                    <Description resid="TaskpaneButton.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>KustoTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <!-- Resources referenced above -->
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/assets/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/assets/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://microsoft.github.io/excel-to-kusto-datatable/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Kusto"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="To Datatable"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Convert selected cells to Kusto datatable syntax"/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
