<?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>f4f3a3b4-1234-4a5b-9cde-000000000001</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Bioeconomy For Change</ProviderName>
  <DefaultLocale>fr-FR</DefaultLocale>
  <DisplayName DefaultValue="Créer tâche Notion"/>
  <Description DefaultValue="Créer une tâche Notion à partir du mail sélectionné."/>
  <IconUrl DefaultValue="https://b4c.org/outlook-notion/outlook-notion/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://b4c.org/outlook-notion/outlook-notion/icon-64.png"/>

  <SupportUrl DefaultValue="https://bioeconomyforchange.eu"/>

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

  <Requirements>
    <Sets DefaultMinVersion="1.5">
      <Set Name="Mailbox"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://b4c.org/outlook-notion/outlook-notion/taskpane.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <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/1.0" 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="B4C.NotionTask.Group">
                <Label resid="groupLabel"/>
                <Control xsi:type="Button" id="B4C.NotionTask.Button">
                  <Label resid="buttonLabel"/>
                  <Supertip>
                    <Title resid="buttonLabel"/>
                    <Description resid="buttonDescription"/>
                  </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://b4c.org/outlook-notion/outlook-notion/icon-16.png"/>
        <bt:Image id="icon32" DefaultValue="https://b4c.org/outlook-notion/outlook-notion/icon-32.png"/>
        <bt:Image id="icon80" DefaultValue="https://b4c.org/outlook-notion/outlook-notion/icon-80.png"/>
      </bt:Images>

      <bt:Urls>
        <bt:Url id="taskpaneUrl" DefaultValue="https://b4c.org/outlook-notion/outlook-notion/taskpane.html"/>
      </bt:Urls>

      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="Notion"/>
        <bt:String id="buttonLabel" DefaultValue="Créer tâche Notion"/>
      </bt:ShortStrings>

      <bt:LongStrings>
        <bt:String id="buttonDescription" DefaultValue="Créer une tâche Notion à partir de ce mail via n8n."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
