<?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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">

  <Id>678bcde7-e255-49fc-a843-163f37c388df</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>BlueMath</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="BlueMath" />
  <Description DefaultValue="Type, convert, and format math equations in Word: visual editor, LaTeX, batch conversion, and exam tools for teachers." />
  <IconUrl DefaultValue="https://bluemath.vercel.app/assets/icon-beta-32.png" />
  <HighResolutionIconUrl DefaultValue="https://bluemath.vercel.app/assets/icon-beta-64.png" />
  <!-- Real website URLs (bluemath.app) — deliberately NOT localhost so the
       production-manifest generator leaves them untouched. -->
  <SupportUrl DefaultValue="https://bluemath.app/support" />

  <AppDomains>
    <AppDomain>https://bluemath.vercel.app</AppDomain>
    <AppDomain>https://bluemath.app</AppDomain>
    <AppDomain>https://www.bluemath.app</AppDomain>
    <AppDomain>https://admin.bluemath.app</AppDomain>
  </AppDomains>

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

  <!-- WordApi 1.1 = Word 2016+. Without this block the store also offers the
       add-in to Word 2013, where the pane's Word.run APIs do not exist. -->
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="WordApi" MinVersion="1.1" />
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://bluemath.vercel.app/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">

    <Hosts>
      <!-- Word -->
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>
          <FunctionFile resid="Commands.Url" />

          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="BlueMath.Group">
                <Label resid="GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="64" resid="Icon.64x64" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>

                <Control xsi:type="Button" id="BlueMath.ShowTaskPane">
                  <Label resid="TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="TaskpaneButton.Label" />
                    <Description resid="TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="64" resid="Icon.64x64" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>BlueMathTaskPane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

                <!-- Convert $…$ lives ONLY on the BlueMath custom tab
                     (BlueMath.ConvertAllTab) — the Home tab keeps a single
                     entry point to reduce ribbon clutter. -->
              </Group>
            </OfficeTab>

            <!-- Custom "BlueMath" ribbon tab -->
            <CustomTab id="BlueMath.Tab">

              <!-- Group 1: highlight "Open BlueMath" (large button) -->
              <Group id="BlueMath.MainGroup">
                <Label resid="MainGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>

                <Control xsi:type="Button" id="BlueMath.OpenTaskPane">
                  <Label resid="OpenButton.Label" />
                  <Supertip>
                    <Title resid="OpenButton.Label" />
                    <Description resid="OpenButton.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">
                    <TaskpaneId>BlueMathTaskPane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

                <Control xsi:type="Button" id="BlueMath.OpenChem">
                  <Label resid="ChemButton.Label" />
                  <Supertip>
                    <Title resid="ChemButton.Label" />
                    <Description resid="ChemButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="ChemIcon.16x16" />
                    <bt:Image size="32" resid="ChemIcon.32x32" />
                    <bt:Image size="80" resid="ChemIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>BlueMathTaskPaneChem</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url.Chem" />
                  </Action>
                </Control>

                <Control xsi:type="Button" id="BlueMath.ConvertAllTab">
                  <Label resid="ConvertButton.Label" />
                  <Supertip>
                    <Title resid="ConvertButton.Label" />
                    <Description resid="ConvertButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="ConvertIcon.16x16" />
                    <bt:Image size="32" resid="ConvertIcon.32x32" />
                    <bt:Image size="80" resid="ConvertIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>convertAllLatex</FunctionName>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="BlueMath.ExamTools">
                  <Label resid="ExamButton.Label" />
                  <Supertip>
                    <Title resid="ExamButton.Label" />
                    <Description resid="ExamButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="ExamIcon.16x16" />
                    <bt:Image size="32" resid="ExamIcon.32x32" />
                    <bt:Image size="80" resid="ExamIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>BlueMathTaskPaneDocs</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url.Docs" />
                  </Action>
                </Control>

              </Group>

              <!-- Group 2: Help (Documentation / Contact Support / Give Feedback) -->
              <Group id="BlueMath.HelpGroup">
                <Label resid="HelpGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>

                <Control xsi:type="Button" id="BlueMath.Documentation">
                  <Label resid="DocsButton.Label" />
                  <Supertip>
                    <Title resid="DocsButton.Label" />
                    <Description resid="DocsButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="DocsIcon.16x16" />
                    <bt:Image size="32" resid="DocsIcon.32x32" />
                    <bt:Image size="80" resid="DocsIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>openDocs</FunctionName>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="BlueMath.Support">
                  <Label resid="SupportButton.Label" />
                  <Supertip>
                    <Title resid="SupportButton.Label" />
                    <Description resid="SupportButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="SupportIcon.16x16" />
                    <bt:Image size="32" resid="SupportIcon.32x32" />
                    <bt:Image size="80" resid="SupportIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>openSupport</FunctionName>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="BlueMath.Feedback">
                  <Label resid="FeedbackButton.Label" />
                  <Supertip>
                    <Title resid="FeedbackButton.Label" />
                    <Description resid="FeedbackButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="FeedbackIcon.16x16" />
                    <bt:Image size="32" resid="FeedbackIcon.32x32" />
                    <bt:Image size="80" resid="FeedbackIcon.80x80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>openFeedback</FunctionName>
                  </Action>
                </Control>
              </Group>

              <Label resid="CustomTab.Label" />
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>

</Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-beta-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-beta-32.png" />
        <bt:Image id="Icon.64x64" DefaultValue="https://bluemath.vercel.app/assets/icon-beta-64.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-beta-80.png" />
        <!-- Per-feature ribbon icons — SVG masters in scripts/ribbon-icons/,
             rasterized to assets/ (see CLAUDE.md). -->
        <bt:Image id="DocsIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-docs-16.png" />
        <bt:Image id="DocsIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-docs-32.png" />
        <bt:Image id="DocsIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-docs-80.png" />
        <bt:Image id="SupportIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-support-16.png" />
        <bt:Image id="SupportIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-support-32.png" />
        <bt:Image id="SupportIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-support-80.png" />
        <bt:Image id="FeedbackIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-feedback-16.png" />
        <bt:Image id="FeedbackIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-feedback-32.png" />
        <bt:Image id="FeedbackIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-feedback-80.png" />
        <bt:Image id="ChemIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-chem-16.png" />
        <bt:Image id="ChemIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-chem-32.png" />
        <bt:Image id="ChemIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-chem-80.png" />
        <bt:Image id="ConvertIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-convert-16.png" />
        <bt:Image id="ConvertIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-convert-32.png" />
        <bt:Image id="ConvertIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-convert-80.png" />
        <bt:Image id="ExamIcon.16x16" DefaultValue="https://bluemath.vercel.app/assets/icon-exam-16.png" />
        <bt:Image id="ExamIcon.32x32" DefaultValue="https://bluemath.vercel.app/assets/icon-exam-32.png" />
        <bt:Image id="ExamIcon.80x80" DefaultValue="https://bluemath.vercel.app/assets/icon-exam-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://bluemath.app/docs" />
        <bt:Url id="Commands.Url" DefaultValue="https://bluemath.vercel.app/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://bluemath.vercel.app/taskpane.html" />
        <!-- Deep links: App.tsx reads ?tab= to pick the initial tab. -->
        <bt:Url id="Taskpane.Url.Chem" DefaultValue="https://bluemath.vercel.app/taskpane.html?tab=chem" />
        <bt:Url id="Taskpane.Url.Docs" DefaultValue="https://bluemath.vercel.app/taskpane.html?tab=docs" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GetStarted.Title" DefaultValue="Get started with BlueMath!" />
        <bt:String id="GroupLabel" DefaultValue="BlueMath" />
        <bt:String id="TaskpaneButton.Label" DefaultValue="Open BlueMath" />
        <bt:String id="ConvertButton.Label" DefaultValue="Convert $...$" />

        <!-- Custom "BlueMath" tab (en default + vi-vn override) -->
        <bt:String id="CustomTab.Label" DefaultValue="BlueMath">
          <bt:Override Locale="vi-vn" Value="BlueMath" />
        </bt:String>
        <bt:String id="MainGroup.Label" DefaultValue="BlueMath">
          <bt:Override Locale="vi-vn" Value="BlueMath" />
        </bt:String>
        <bt:String id="HelpGroup.Label" DefaultValue="Help">
          <bt:Override Locale="vi-vn" Value="Trợ giúp" />
        </bt:String>
        <bt:String id="OpenButton.Label" DefaultValue="Open BlueMath">
          <bt:Override Locale="vi-vn" Value="Mở BlueMath" />
        </bt:String>
        <bt:String id="ChemButton.Label" DefaultValue="Open BlueChem">
          <bt:Override Locale="vi-vn" Value="Mở BlueChem" />
        </bt:String>
        <bt:String id="ExamButton.Label" DefaultValue="Exam Tools">
          <bt:Override Locale="vi-vn" Value="Công cụ đề thi" />
        </bt:String>
        <bt:String id="DocsButton.Label" DefaultValue="Documentation">
          <bt:Override Locale="vi-vn" Value="Tài liệu" />
        </bt:String>
        <bt:String id="SupportButton.Label" DefaultValue="Contact Support">
          <bt:Override Locale="vi-vn" Value="Liên hệ hỗ trợ" />
        </bt:String>
        <bt:String id="FeedbackButton.Label" DefaultValue="Give Feedback">
          <bt:Override Locale="vi-vn" Value="Góp ý" />
        </bt:String>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="GetStarted.Description" DefaultValue="BlueMath is loaded. Open the task pane to insert and edit equations." />
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open the BlueMath math equation editor." />
        <bt:String id="ConvertButton.Tooltip" DefaultValue="Scan the document and convert all $...$ LaTeX expressions to Word Math objects." />

        <!-- Custom "BlueMath" tab tooltips (en default + vi-vn override) -->
        <bt:String id="OpenButton.Tooltip" DefaultValue="Open the BlueMath math equation editor task pane.">
          <bt:Override Locale="vi-vn" Value="Mở khung soạn thảo công thức toán BlueMath." />
        </bt:String>
        <bt:String id="ChemButton.Tooltip" DefaultValue="Open the BlueChem chemistry equation editor.">
          <bt:Override Locale="vi-vn" Value="Mở trình soạn công thức Hóa học BlueChem." />
        </bt:String>
        <bt:String id="ExamButton.Tooltip" DefaultValue="Open the document tools: exam formatting, shuffling, batch conversion.">
          <bt:Override Locale="vi-vn" Value="Mở công cụ tài liệu: định dạng đề, trộn đề, chuyển đổi hàng loạt." />
        </bt:String>
        <bt:String id="DocsButton.Tooltip" DefaultValue="Open the BlueMath documentation in your browser.">
          <bt:Override Locale="vi-vn" Value="Mở tài liệu hướng dẫn BlueMath trong trình duyệt." />
        </bt:String>
        <bt:String id="SupportButton.Tooltip" DefaultValue="Contact the BlueMath support team.">
          <bt:Override Locale="vi-vn" Value="Liên hệ đội ngũ hỗ trợ BlueMath." />
        </bt:String>
        <bt:String id="FeedbackButton.Tooltip" DefaultValue="Send us feedback about BlueMath.">
          <bt:Override Locale="vi-vn" Value="Gửi góp ý của bạn về BlueMath." />
        </bt:String>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
