<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
  mail-lookout add-in manifest (add-in only, XML format).

  This manifest registers a Smart Alerts handler. The handler runs
  on send (OnMessageSend) and uses Outlook's built-in Smart Alerts
  dialog to show the review summary.

  Before you deploy:
    1. Replace the <Id> below with your own GUID.
    2. Replace every https://avishaikofun.com URL with your host.
    3. Replace ProviderName, SupportUrl, and AppDomains.

  SendMode is SoftBlock. There is no one-click "send anyway" path.
-->
<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>7888d7db-1c99-4e49-a191-ea73f4088740</Id>
  <Version>1.1.10.0</Version>
  <ProviderName>Avishai Kofun</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Mail Lookout" />
  <Description DefaultValue="Review recipients, attachments, and body before an email is sent." />
  <IconUrl DefaultValue="https://avishaikofun.com/assets/icon-64.png" />
  <HighResolutionIconUrl DefaultValue="https://avishaikofun.com/assets/icon-128.png" />
  <SupportUrl DefaultValue="https://avishaikofun.com/support.html" />

  <AppDomains>
    <AppDomain>https://avishaikofun.com</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>

  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.15" />
    </Sets>
  </Requirements>

  <!--
    Legacy activation block. Modern clients use VersionOverrides
    below, but the base manifest still needs a form and a rule to
    be valid. This points at the same page as the runtime.
  -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://avishaikofun.com/commands.html" />
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <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.15">
          <bt:Set Name="Mailbox" MinVersion="1.15" />
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <!--
            The runtime that hosts the send handler. New Outlook
            and Outlook on the web load commands.html in a browser
            runtime. The javascript override is for the legacy
            JS-only runtime on classic Windows, which this project
            does not target. See the README limitations section.
          -->
          <Runtimes>
            <Runtime resid="WebViewRuntime.Url">
              <Override type="javascript" resid="JSRuntime.Url" />
            </Runtime>
          </Runtimes>

          <DesktopFormFactor>
            <FunctionFile resid="WebViewRuntime.Url" />

            <!-- Task pane opened from the Smart Alerts Take Action button. -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="ReviewGroup">
                  <Label resid="ReviewGroup.Label" />
                  <Control xsi:type="Button" id="ReviewPaneButton">
                    <Label resid="ReviewPaneButton.Label" />
                    <Supertip>
                      <Title resid="ReviewPaneButton.Label" />
                      <Description resid="ReviewPaneButton.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>
                  <Control xsi:type="Button" id="SettingsButton">
                    <Label resid="SettingsButton.Label" />
                    <Supertip>
                      <Title resid="SettingsButton.Label" />
                      <Description resid="SettingsButton.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="Settings.Url" />
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- The send-time event that drives the whole add-in. -->
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <LaunchEvent Type="OnMessageSend" FunctionName="onMessageSendHandler" SendMode="SoftBlock" />
              </LaunchEvents>
              <SourceLocation resid="WebViewRuntime.Url" />
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16" DefaultValue="https://avishaikofun.com/assets/icon-16.png" />
          <bt:Image id="Icon.32" DefaultValue="https://avishaikofun.com/assets/icon-32.png" />
          <bt:Image id="Icon.80" DefaultValue="https://avishaikofun.com/assets/icon-80.png" />
        </bt:Images>

        <bt:Urls>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://avishaikofun.com/commands.html" />
          <bt:Url id="JSRuntime.Url" DefaultValue="https://avishaikofun.com/assets/commands.js" />
          <bt:Url id="Taskpane.Url" DefaultValue="https://avishaikofun.com/taskpane.html" />
          <bt:Url id="Settings.Url" DefaultValue="https://avishaikofun.com/settings.html" />
        </bt:Urls>

        <bt:ShortStrings>
          <bt:String id="ReviewGroup.Label" DefaultValue="Mail Lookout" />
          <bt:String id="ReviewPaneButton.Label" DefaultValue="Open review" />
          <bt:String id="SettingsButton.Label" DefaultValue="Settings" />
        </bt:ShortStrings>

        <bt:LongStrings>
          <bt:String id="ReviewPaneButton.Tooltip" DefaultValue="Open the Mail Lookout review pane." />
          <bt:String id="SettingsButton.Tooltip" DefaultValue="Edit Mail Lookout settings: internal domains and the default wait." />
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>

</OfficeApp>
