<?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">
  <Id>54139273-aabf-4cdb-b0ac-342120c86143</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>SIAC Desarrollos</ProviderName>
  <DefaultLocale>es-ES</DefaultLocale>
  <DisplayName DefaultValue="SIAC"/>
  <Description DefaultValue="SIAC — Asistente de IA para Outlook: resume hilos, redacta y responde correos, gestiona tu buzón y genera documentos adjuntos con modelos de Huawei Cloud MaaS."/>
  <IconUrl DefaultValue="https://ia.siac.com.co/outlook/assets/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://ia.siac.com.co/outlook/assets/icon-80.png"/>
  <SupportUrl DefaultValue="https://ia.siac.com.co/download"/>
  <AppDomains>
    <AppDomain>https://ia.siac.com.co</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets DefaultMinVersion="1.3">
      <Set Name="Mailbox" MinVersion="1.3"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://ia.siac.com.co/outlook/index.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://ia.siac.com.co/outlook/index.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <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>
          <!-- Superficie de LECTURA -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="siacGroupRead">
                <Label resid="SiacGroup.Label"/>
                <Control xsi:type="Button" id="siacOpenRead">
                  <Label resid="SiacOpen.Label"/>
                  <Supertip>
                    <Title resid="SiacOpen.Label"/>
                    <Description resid="SiacOpen.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">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <!-- Superficie de REDACCIÓN -->
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="siacGroupCompose">
                <Label resid="SiacGroup.Label"/>
                <Control xsi:type="Button" id="siacOpenCompose">
                  <Label resid="SiacOpen.Label"/>
                  <Supertip>
                    <Title resid="SiacOpen.Label"/>
                    <Description resid="SiacOpenCompose.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">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://ia.siac.com.co/outlook/assets/icon-16.png"/>
        <bt:Image id="Icon.32" DefaultValue="https://ia.siac.com.co/outlook/assets/icon-32.png"/>
        <bt:Image id="Icon.80" DefaultValue="https://ia.siac.com.co/outlook/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://ia.siac.com.co/outlook/index.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="SiacGroup.Label" DefaultValue="SIAC"/>
        <bt:String id="SiacOpen.Label" DefaultValue="Abrir SIAC"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="SiacOpen.Tooltip" DefaultValue="Resume el hilo, extrae tareas y responde con la IA de SIAC."/>
        <bt:String id="SiacOpenCompose.Tooltip" DefaultValue="Redacta, reescribe y ajusta el tono de tu correo con la IA de SIAC."/>
      </bt:LongStrings>
    </Resources>
    <!--
      SSO con Microsoft Graph (opcional). NO incluyas <WebApplicationInfo> hasta haber
      registrado una app real en Entra ID: Microsoft valida que el App (client) ID exista
      y que el dominio del Resource esté verificado; un valor de ejemplo provoca un error
      400 al instalar el complemento. Una vez registrada la app, añade aquí, justo antes
      de </VersionOverrides>, el siguiente bloque con TUS valores reales:

      <WebApplicationInfo>
        <Id>EL-CLIENT-ID-DE-TU-APP-EN-ENTRA-ID</Id>
        <Resource>api://ia.siac.com.co/EL-CLIENT-ID-DE-TU-APP-EN-ENTRA-ID</Resource>
        <Scopes>
          <Scope>openid</Scope>
          <Scope>profile</Scope>
          <Scope>Mail.Read</Scope>
          <Scope>Mail.ReadWrite</Scope>
          <Scope>Calendars.ReadWrite</Scope>
          <Scope>Contacts.Read</Scope>
          <Scope>User.Read</Scope>
        </Scopes>
      </WebApplicationInfo>
    -->
  </VersionOverrides>
</OfficeApp>
