<?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">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id>2f1f3ce3-772e-44b2-afcb-dc7468939356</Id>

  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>24.10.31.2</Version>
  <ProviderName>Dcoya</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Report message" />
  <Description DefaultValue="Reports selected message as suspicious"/>

  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="https://ninjio-static.s3.us-west-1.amazonaws.com/images/small-NINJIO%20LOGO.png" />
  <HighResolutionIconUrl DefaultValue="https://ninjio-static.s3.us-west-1.amazonaws.com/images/small-NINJIO%20LOGO.png"/>

  <!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
  <SupportUrl DefaultValue="https://dcoya.com/" />

  <AppDomains>
    <AppDomain>https://api.goninjio.com</AppDomain>
    <AppDomain>https://graph.microsoft.com</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://api.goninjio.com"/>
        <RequestedHeight>216</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</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.5">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="functionFile" />
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadGroup">
                  <Label resid="groupLabel" />
                  <Control xsi:type="Button" id="functionFile">
                    <Label resid="paneReadButtonLabel" />
                    <Supertip>
                      <Title resid="paneReadSuperTipTitle" />
                      <Description resid="paneReadSuperTipDescription" />
                    </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>report</FunctionName>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>

          <MobileFormFactor>
            <FunctionFile resid="functionFile" />
            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="msgReadGroup">
                <Label resid="groupLabel"/>
                <Control id="mblRestPaneButton" xsi:type="MobileButton">
                  <Label resid="paneReadButtonLabel" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="icon32" />
                    <bt:Image size="25" scale="2" resid="icon32" />
                    <bt:Image size="25" scale="3" resid="icon32" />

                    <bt:Image size="32" scale="1" resid="icon32" />
                    <bt:Image size="32" scale="2" resid="icon32" />
                    <bt:Image size="32" scale="3" resid="icon32" />

                    <bt:Image size="48" scale="1" resid="icon80" />
                    <bt:Image size="48" scale="2" resid="icon80" />
                    <bt:Image size="48" scale="3" resid="icon80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>report</FunctionName>
                  </Action>
                </Control>
              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="icon16" DefaultValue="https://ninjio-static.s3.us-west-1.amazonaws.com/images/small-NINJIO%20LOGO.png"/>
          <bt:Image id="icon32" DefaultValue="https://ninjio-static.s3.us-west-1.amazonaws.com/images/small-NINJIO%20LOGO.png"/>
          <bt:Image id="icon80" DefaultValue="https://ninjio-static.s3.us-west-1.amazonaws.com/images/small-NINJIO%20LOGO.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="functionFile" DefaultValue="https://api.goninjio.com/static/reporting_office_365/report-button-api-ms-graph.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="Ninjio"/>
          <bt:String id="customTabLabel" DefaultValue="Ninjio"/>
          <bt:String id="paneReadButtonLabel" DefaultValue="Report message"/>
          <bt:String id="paneReadSuperTipTitle" DefaultValue="Click to report displayed message"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="paneReadSuperTipDescription" DefaultValue="Report displayed message as suspicious"/>
        </bt:LongStrings>
      </Resources>

      <WebApplicationInfo>
        <Id>99cce2f5-c8ad-4ee9-803f-cd0ed5b4cfce</Id>
        <Resource>api://api.goninjio.com/99cce2f5-c8ad-4ee9-803f-cd0ed5b4cfce</Resource>
        <Scopes>
          <Scope>user.read</Scope>
          <Scope>files.read</Scope>
          <Scope>Mail.Read</Scope>
          <Scope>Mail.ReadWrite</Scope>
          <Scope>Mail.Send</Scope>
          <Scope>offline_access</Scope>
          <Scope>openid</Scope>
          <Scope>profile</Scope>
        </Scopes>
      </WebApplicationInfo>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
