<?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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
  xsi:type="MailApp">

  <!-- IMPORTANTE: Cambia este ID si ya tienes una versión instalada problemática -->
  <Id>ddb4d00a-19e6-4eb7-bf2c-d0a82132a844</Id>
  <Version>1.0.0.3</Version>
  <ProviderName>NB-BYT-VE</ProviderName>
  <DefaultLocale>es-ES</DefaultLocale>

  <DisplayName DefaultValue="to-galena" />
  <Description DefaultValue="Almacena correos en Galena" />
  <IconUrl DefaultValue="https://galena.byt.com.ve/nb/to-galena/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://galena.byt.com.ve/nb/to-galena/assets/icon-80.png" />
  <SupportUrl DefaultValue="https://galena.byt.com.ve/nb/to-galena/" />

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.3" />
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://galena.byt.com.ve/nb/to-galena/taskpane/taskpane.html" />
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <!-- Permisos mínimos para empezar -->
  <Permissions>ReadItem</Permissions>

  <!-- Solo modo lectura para empezar -->
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
  </Rule>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides"
    xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>

    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <!-- Solo un botón en modo lectura -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="GalenaGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="GalenaButton">
                  <Label resid="ButtonLabel" />
                  <Supertip>
                    <Title resid="ButtonLabel" />
                    <Description resid="ButtonTooltip" />
                  </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">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16"
          DefaultValue="https://galena.byt.com.ve/nb/to-galena/assets/icon-16.png" />
        <bt:Image id="Icon.32x32"
          DefaultValue="https://galena.byt.com.ve/nb/to-galena/assets/icon-32.png" />
        <bt:Image id="Icon.80x80"
          DefaultValue="https://galena.byt.com.ve/nb/to-galena/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url"
          DefaultValue="https://galena.byt.com.ve/nb/to-galena/taskpane/taskpane.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Galena" />
        <bt:String id="ButtonLabel" DefaultValue="to-galena" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="ButtonTooltip" DefaultValue="Guardar correos en expediente Galena" />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>