<?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>44444444-4444-4444-4444-444444444444</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>HOLON</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="AI Assistant"/>
  <Description DefaultValue="AI assistant inside Outlook — reads the thread, drafts replies, extracts actions."/>
  <IconUrl DefaultValue="https://localhost:3001/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://localhost:3001/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://localhost:3001/support"/>
  <AppDomains>
    <AppDomain>https://localhost:3001</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.5"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:3001/taskpane.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="HolonGroup">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="AskButtonRead">
                    <Label resid="Ask.Label"/>
                    <Supertip>
                      <Title resid="Ask.Label"/>
                      <Description resid="Ask.Tip"/>
                    </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>
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="HolonGroupCompose">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="AskButtonCompose">
                    <Label resid="Ask.Label"/>
                    <Supertip>
                      <Title resid="Ask.Label"/>
                      <Description resid="Ask.Tip"/>
                    </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://localhost:3001/assets/icon-16.png"/>
          <bt:Image id="Icon.32" DefaultValue="https://localhost:3001/assets/icon-32.png"/>
          <bt:Image id="Icon.80" DefaultValue="https://localhost:3001/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3001/taskpane.html"/>
          <bt:Url id="Commands.Url" DefaultValue="https://localhost:3001/commands.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="Group.Label" DefaultValue="AI Assistant"/>
          <bt:String id="Ask.Label" DefaultValue="Ask"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="Ask.Tip" DefaultValue="Open the AI Assistant task pane."/>
        </bt:LongStrings>
      </Resources>
      <!-- SSO: add a <WebApplicationInfo> with your registered Entra app's client-id GUID here
           when wiring real Microsoft SSO. Omitted for local dev (NAA popup / dev-auth bypass). -->
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
