<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>5ab14cd7-dbe1-4d20-ab4c-7368e9e25e16</Id>
  <Version>1.0.0.12</Version>
  <ProviderName>Keiji Momose</ProviderName>
  <DefaultLocale>ja-JP</DefaultLocale>

  <DisplayName DefaultValue="Confirm-Address for Outlook.js"/>
  <Description DefaultValue="メール送信前に、送信先メールアドレス・添付ファイル名・本文冒頭を確認します。※Outlook on the Webでご利用の際は、[サイトの設定]→[ポップアップとリダイレクト]を[許可する]に設定してください。Outlook Classicをご使用の方は従来のConfirm-Addressをインストールの上、本ダイアログボックスでは[そのまま送信]を押してください。"/>

  <IconUrl DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/assets/img/ConfirmAddress-64x64.png"/>
  <HighResolutionIconUrl DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/assets/img/ConfirmAddress-192x192.png"/>
  <SupportUrl DefaultValue="https://github.com/beatkz/"/>

  <AppDomains>
    <AppDomain>https://outlook.office365.com</AppDomain>
    <AppDomain>https://beatkz.github.io</AppDomain>
  </AppDomains>

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

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

  <!-- ★ 旧スキーマ：タスクペイン（ホスト）だけを指定 -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/settings.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</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">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">

      <Requirements>
        <bt:Sets DefaultMinVersion="1.15">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>

      <Hosts>
        <Host xsi:type="MailHost">
          <Runtimes>
            <!-- OnMessageSend 用の軽量ランタイム（bgevent.html） -->
            <Runtime resid="WebViewRuntime.Url">
              <!-- Outlook Classic用 JSファイル(VSTOアドインで処理) -->
              <Override type="javascript" resid="BgeventOlc.Url"/>
            </Runtime>
          </Runtimes>

          <DesktopFormFactor>

            <!-- Compose リボン：設定ボタン（タスクペインを表示） -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgComposeGroup">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="msgComposeOpenPaneButton">
                    <Label resid="SettingsButton.Label"/>
                    <Supertip>
                      <Title resid="SettingsButton.Label"/>
                      <Description resid="SettingsButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Settings.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- OnMessageSend（SoftBlock） -->
            <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.16x16" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/assets/img/ConfirmAddress-16x16.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/assets/img/ConfirmAddress-32x32.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/assets/img/ConfirmAddress-80x80.png"/>
        </bt:Images>

        <bt:Urls>
          <!-- Outlook Classic用 JSファイル（bgevent_olc.js） -->
          <bt:Url id="BgeventOlc.Url" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/bgevent_olc.js"/>

          <!-- ダイアログの最初のページ（コードから displayDialogAsync で開く） -->
          <bt:Url id="Capopup.Url" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/capopup.html"/>

          <!-- タスクペイン（設定画面） -->
          <bt:Url id="Settings.Url" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/settings.html"/>

          <!-- OnMessageSend 用ランタイム -->
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://beatkz.github.io/confirm-address-outlook-js/bgevent.html"/>
        </bt:Urls>

        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="Confirm-Address for Outlook"/>
          <bt:String id="SettingsButton.Label" DefaultValue="設定"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="SettingsButton.Tooltip" DefaultValue="Opens a pane to provide additional functionality or information."/>
        </bt:LongStrings>
      </Resources>

    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
