<?xml version="1.0" encoding="UTF-8"?>
<!--
  CalCourtDeadlines, as an Outlook add-in.

  WHY THE XML MANIFEST AND NOT THE UNIFIED JSON ONE. The unified manifest for
  Microsoft 365 is where Microsoft is heading, and it is NOT SUPPORTED IN
  OUTLOOK ON MAC. The add-in only manifest is still fully supported, works in
  classic Outlook on Windows, new Outlook on Windows, Outlook on the web, and
  Mac, and it is the one that sideloads from a file in every client today. For
  a mixed-client audience that is the whole argument.

  THE ID IS PERMANENT. Changing it makes Outlook treat this as a different
  add-in, so anyone who installed the old one keeps it forever alongside the new
  one. Never regenerate it.

  ACTIVATION, and what it cannot promise. Outlook add-in commands are bound to
  a context, so this appears on a selected message and on an open appointment
  rather than floating free in the Calendar module. "No item context" exists in
  requirement set 1.13 but does not activate in Outlook on the web or new
  Outlook on Windows, which is most of this audience, so claiming a
  context-free pane would have been a promise the platform does not keep.
  Requirement set is 1.3, the minimum for add-in commands, to keep older
  desktop clients in rather than buying a feature that does not work anyway.

  PERMISSIONS: ReadItem. Microsoft lists Restricted below it, but
  displayNewAppointmentForm needs read item at minimum, so ReadItem is the
  least this add-in can ask for. The pane never reads the selected message or
  appointment. There is no Microsoft Graph call and no Azure app registration.

  DESCRIPTION AND SUPPORT URL, corrected 2026-09-28 (version 1.0.1.0). The
  description and button tip said the add-in writes deadlines into the
  calendar, which the read-only pane did not do, and SupportUrl pointed at
  /outlook, which had no page and answered 404.

  VERSION 1.1.0.0, 2026-11-10. The pane is now /outlook/pane, which runs the
  site's calculators and opens any computed deadline as a pre-filled Outlook
  appointment through Office.context.mailbox.displayNewAppointmentForm
  (requirement set Mailbox 1.1, minimum permission "read item", read mode, so
  ReadItem and 1.3 below already cover it). The add-in still writes nothing by
  itself: the user saves the form. No Microsoft Graph. The old docket view at
  /outlook/taskpane.html stays and is linked from the new pane. SupportUrl is
  /outlook again, which is now a real page. The DesktopFormFactor only is
  deliberate: Microsoft Learn says displayNewAppointmentForm "isn't supported
  in Outlook on Android or on iOS", so a mobile surface would offer a button
  that cannot work.
-->
<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>ad769ef6-8616-43ed-aebb-89013e7dccc7</Id>
  <Version>1.1.0.0</Version>
  <ProviderName>CalCourtDeadlines.com</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="California Court Deadlines"/>
  <Description DefaultValue="Work out California court deadlines beside your mail and open any date as a pre-filled Outlook appointment, which you check and save. It does not change your calendar on its own."/>
  <IconUrl DefaultValue="https://calcourtdeadlines.com/outlook/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://calcourtdeadlines.com/outlook/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://calcourtdeadlines.com/outlook"/>

  <!-- Every host the pane may navigate to. Only this site. -->
  <AppDomains>
    <AppDomain>https://calcourtdeadlines.com</AppDomain>
  </AppDomains>

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

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

  <!--
    The 1.0 fallback surface, for a client that does not read VersionOverrides.
    It has to name a page, so it names the same pane.
  -->
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://calcourtdeadlines.com/outlook/pane"/>
        <RequestedHeight>350</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadItem</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read"/>
  </Rule>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>

    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Taskpane.Url"/>

          <!-- On a selected message. The only surface that works everywhere. -->
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="ccdMsgGroup">
                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="ccdMsgOpen">
                  <Label resid="Button.Label"/>
                  <Supertip>
                    <Title resid="Button.Label"/>
                    <Description resid="Button.Tip"/>
                  </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>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

          <!-- On an appointment the user is looking at, which is where somebody
               thinking about dates actually is. -->
          <ExtensionPoint xsi:type="AppointmentAttendeeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="ccdApptGroup">
                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="ccdApptOpen">
                  <Label resid="Button.Label"/>
                  <Supertip>
                    <Title resid="Button.Label"/>
                    <Description resid="Button.Tip"/>
                  </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>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://calcourtdeadlines.com/outlook/assets/icon-16.png"/>
        <bt:Image id="Icon.32" DefaultValue="https://calcourtdeadlines.com/outlook/assets/icon-32.png"/>
        <bt:Image id="Icon.80" DefaultValue="https://calcourtdeadlines.com/outlook/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://calcourtdeadlines.com/outlook/pane"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Court deadlines"/>
        <bt:String id="Button.Label" DefaultValue="Deadline calculator"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Button.Tip" DefaultValue="Work out a California court deadline and open it as a pre-filled appointment for you to check and save. Your saved docket is one click away."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
