<?xml version="1.0" encoding="UTF-8"?>
<!-- Pages are referenced without .html: Workers assets redirect taskpane.html to /taskpane.
     Add-in-only XML manifest: the form every Outlook (classic, new, web, Mac) can sideload from a file or URL.
     https://outlook-markdown.maurice-frank.workers.dev is replaced at build time with ADDIN_BASE_URL. -->
<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>d4a1bc4f-b40b-4ecc-9652-0fb03bfcdc19</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Maurice Frank</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Copy as Markdown"/>
  <Description DefaultValue="Copy the open mail to the clipboard as Markdown: headers, body and attachment names."/>
  <IconUrl DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/icons/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/icons/icon-128.png"/>
  <SupportUrl DefaultValue="https://github.com/morris-frank/outlook-markdown"/>
  <AppDomains>
    <AppDomain>https://outlook-markdown.maurice-frank.workers.dev</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/taskpane"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <!-- The open item only: no mailbox-wide access, no Graph, no sign-in. -->
  <Permissions>ReadItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- V1_1 for SupportsPinning: the pane stays open while you click through mails. -->
    <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>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadGroup">
                  <Label resid="Group.Label"/>
                  <Control xsi:type="Button" id="msgReadCopyMarkdown">
                    <Label resid="Button.Label"/>
                    <Supertip>
                      <Title resid="Button.Label"/>
                      <Description resid="Button.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"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16" DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/icons/icon-16.png"/>
          <bt:Image id="Icon.32" DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/icons/icon-32.png"/>
          <bt:Image id="Icon.80" DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/icons/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://outlook-markdown.maurice-frank.workers.dev/taskpane"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="Group.Label" DefaultValue="Markdown"/>
          <bt:String id="Button.Label" DefaultValue="Copy as Markdown"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="Button.Tooltip" DefaultValue="Copy this mail to the clipboard as Markdown."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
