<?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>a8ca8077-589e-4e77-a104-f3c534b5df59</Id>
  <Version>1.1.0.0</Version>
  <ProviderName>Scomm.AI</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Scomm.AI" />
  <Description DefaultValue="OpenPGP encrypt/sign/decrypt, discovery.scomm.ai discovery, semantics, and compliance for Outlook." />
  <IconUrl DefaultValue="https://office.scomm.ai/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://office.scomm.ai/assets/icon-64.png" />
  <SupportUrl DefaultValue="https://office.scomm.ai/taskpane.html" />
  <AppDomains>
    <AppDomain>https://office.scomm.ai</AppDomain>
    <AppDomain>https://billing.scomm.ai</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://office.scomm.ai/taskpane.html" />
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://office.scomm.ai/taskpane.html" />
      </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">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.5">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="CommandsUrl" />
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="SCommReadGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="SCommDecrypt">
                  <Label resid="DecryptButtonLabel" />
                  <Supertip>
                    <Title resid="DecryptButtonLabel" />
                    <Description resid="DecryptButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="DecryptTaskPaneUrl" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="SCommVerify">
                  <Label resid="VerifyButtonLabel" />
                  <Supertip>
                    <Title resid="VerifyButtonLabel" />
                    <Description resid="VerifyButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="VerifyTaskPaneUrl" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="SCommReadTaskPane">
                  <Label resid="TaskPaneButtonLabel" />
                  <Supertip>
                    <Title resid="TaskPaneButtonLabel" />
                    <Description resid="TaskPaneButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="TaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="SCommComposeGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="SCommEncrypt">
                  <Label resid="EncryptButtonLabel" />
                  <Supertip>
                    <Title resid="EncryptButtonLabel" />
                    <Description resid="EncryptButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>encryptMessage</FunctionName>
                  </Action>
                </Control>
                <Control xsi:type="Button" id="SCommSign">
                  <Label resid="SignButtonLabel" />
                  <Supertip>
                    <Title resid="SignButtonLabel" />
                    <Description resid="SignButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>signMessage</FunctionName>
                  </Action>
                </Control>
                <Control xsi:type="Button" id="SCommComposeTaskPane">
                  <Label resid="TaskPaneButtonLabel" />
                  <Supertip>
                    <Title resid="TaskPaneButtonLabel" />
                    <Description resid="TaskPaneButtonDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon16" />
                    <bt:Image size="32" resid="Icon32" />
                    <bt:Image size="80" resid="Icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="TaskPaneUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon16" DefaultValue="https://office.scomm.ai/assets/icon-16.png" />
        <bt:Image id="Icon32" DefaultValue="https://office.scomm.ai/assets/icon-32.png" />
        <bt:Image id="Icon80" DefaultValue="https://office.scomm.ai/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="TaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html" />
        <bt:Url id="CommandsUrl" DefaultValue="https://office.scomm.ai/commands.html" />
        <bt:Url id="DecryptTaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html?module=security&amp;action=decrypt" />
        <bt:Url id="VerifyTaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html?module=security&amp;action=verify" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Scomm.AI" />
        <bt:String id="TaskPaneButtonLabel" DefaultValue="Scomm.AI" />
        <bt:String id="EncryptButtonLabel" DefaultValue="Encrypt" />
        <bt:String id="SignButtonLabel" DefaultValue="Sign" />
        <bt:String id="DecryptButtonLabel" DefaultValue="Decrypt" />
        <bt:String id="VerifyButtonLabel" DefaultValue="Verify" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskPaneButtonDesc" DefaultValue="Open Scomm.AI for identity, OpenPGP, semantics, and compliance." />
        <bt:String id="EncryptButtonDesc" DefaultValue="Encrypt this draft with classical OpenPGP keys from discovery.scomm.ai." />
        <bt:String id="SignButtonDesc" DefaultValue="Clearsign this draft with your Scomm.AI OpenPGP key." />
        <bt:String id="DecryptButtonDesc" DefaultValue="Decrypt the OpenPGP body in the Scomm.AI pane. Plaintext stays in the pane." />
        <bt:String id="VerifyButtonDesc" DefaultValue="Verify an OpenPGP signature using the sender key on discovery.scomm.ai." />
      </bt:LongStrings>
    </Resources>
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.16">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <Runtimes>
            <Runtime resid="CommandsUrl" />
          </Runtimes>
          <DesktopFormFactor>
            <FunctionFile resid="CommandsUrl" />
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="SCommReadGroupV11">
                  <Label resid="GroupLabel" />
                  <Control xsi:type="Button" id="SCommDecryptV11">
                    <Label resid="DecryptButtonLabel" />
                    <Supertip>
                      <Title resid="DecryptButtonLabel" />
                      <Description resid="DecryptButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="DecryptTaskPaneUrl" />
                    </Action>
                  </Control>
                  <Control xsi:type="Button" id="SCommVerifyV11">
                    <Label resid="VerifyButtonLabel" />
                    <Supertip>
                      <Title resid="VerifyButtonLabel" />
                      <Description resid="VerifyButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="VerifyTaskPaneUrl" />
                    </Action>
                  </Control>
                  <Control xsi:type="Button" id="SCommReadTaskPaneV11">
                    <Label resid="TaskPaneButtonLabel" />
                    <Supertip>
                      <Title resid="TaskPaneButtonLabel" />
                      <Description resid="TaskPaneButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="TaskPaneUrl" />
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="SCommComposeGroupV11">
                  <Label resid="GroupLabel" />
                  <Control xsi:type="Button" id="SCommEncryptV11">
                    <Label resid="EncryptButtonLabel" />
                    <Supertip>
                      <Title resid="EncryptButtonLabel" />
                      <Description resid="EncryptButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ExecuteFunction">
                      <FunctionName>encryptMessage</FunctionName>
                    </Action>
                  </Control>
                  <Control xsi:type="Button" id="SCommSignV11">
                    <Label resid="SignButtonLabel" />
                    <Supertip>
                      <Title resid="SignButtonLabel" />
                      <Description resid="SignButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ExecuteFunction">
                      <FunctionName>signMessage</FunctionName>
                    </Action>
                  </Control>
                  <Control xsi:type="Button" id="SCommComposeTaskPaneV11">
                    <Label resid="TaskPaneButtonLabel" />
                    <Supertip>
                      <Title resid="TaskPaneButtonLabel" />
                      <Description resid="TaskPaneButtonDesc" />
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon16" />
                      <bt:Image size="32" resid="Icon32" />
                      <bt:Image size="80" resid="Icon80" />
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="TaskPaneUrl" />
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSend" SendMode="Block" />
                <LaunchEvent Type="OnMessageCompose" FunctionName="onMessageCompose" />
                <LaunchEvent Type="OnMessageDecrypt" FunctionName="onMessageDecrypt" HeaderName="X-SComm-Encryption" />
              </LaunchEvents>
              <SourceLocation resid="CommandsUrl" />
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon16" DefaultValue="https://office.scomm.ai/assets/icon-16.png" />
          <bt:Image id="Icon32" DefaultValue="https://office.scomm.ai/assets/icon-32.png" />
          <bt:Image id="Icon80" DefaultValue="https://office.scomm.ai/assets/icon-80.png" />
        </bt:Images>
        <bt:Urls>
          <bt:Url id="TaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html" />
          <bt:Url id="CommandsUrl" DefaultValue="https://office.scomm.ai/commands.html" />
          <bt:Url id="DecryptTaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html?module=security&amp;action=decrypt" />
          <bt:Url id="VerifyTaskPaneUrl" DefaultValue="https://office.scomm.ai/taskpane.html?module=security&amp;action=verify" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="Scomm.AI" />
          <bt:String id="TaskPaneButtonLabel" DefaultValue="Scomm.AI" />
          <bt:String id="EncryptButtonLabel" DefaultValue="Encrypt" />
          <bt:String id="SignButtonLabel" DefaultValue="Sign" />
          <bt:String id="DecryptButtonLabel" DefaultValue="Decrypt" />
          <bt:String id="VerifyButtonLabel" DefaultValue="Verify" />
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskPaneButtonDesc" DefaultValue="Open Scomm.AI for identity, OpenPGP, semantics, and compliance." />
          <bt:String id="EncryptButtonDesc" DefaultValue="Encrypt this draft with classical OpenPGP keys from discovery.scomm.ai." />
          <bt:String id="SignButtonDesc" DefaultValue="Clearsign this draft with your Scomm.AI OpenPGP key." />
          <bt:String id="DecryptButtonDesc" DefaultValue="Decrypt the OpenPGP body in the Scomm.AI pane. Plaintext stays in the pane." />
          <bt:String id="VerifyButtonDesc" DefaultValue="Verify an OpenPGP signature using the sender key on discovery.scomm.ai." />
        </bt:LongStrings>
      </Resources>
      <!-- Replace YOUR_AZURE_CLIENT_ID below with the Entra app registration's
           Application (client) ID  the same value as VITE_AZURE_CLIENT_ID in
           apps/outlook-addin/.env. Required for Nested App Authentication (NAA),
           which GraphSubmissionAdapter needs to send PGP/MIME-correct mail. -->
      <WebApplicationInfo>
        <Id>7555f958-ecf8-47d2-b088-b903001e3cbc</Id>
        <Resource>api://office.scomm.ai/7555f958-ecf8-47d2-b088-b903001e3cbc</Resource>
        <Scopes>
          <Scope>User.Read</Scope>
          <Scope>Mail.ReadWrite</Scope>
          <Scope>Mail.Send</Scope>
        </Scopes>
      </WebApplicationInfo>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
