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

	<!-- GUID único do add-in — não alterar após publicação -->
	<Id>a1b2c3d4-e5f6-7890-abcd-ef1234567890</Id>
	<Version>1.0.1.0</Version>
	<ProviderName>Atendare</ProviderName>
	<DefaultLocale>pt-BR</DefaultLocale>
	<DisplayName DefaultValue="Atendare" />
	<Description DefaultValue="Integre o Atendare diretamente no Outlook. Visualize contatos, salve e-mails e use modelos de e-mail sem sair da sua caixa de entrada." />
	<IconUrl DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
	<HighResolutionIconUrl DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
	<SupportUrl DefaultValue="https://help.atendare.com" />

	<AppDomains>
		<!-- Domínio onde o add-in está hospedado (Worker da Cloudflare) -->
		<AppDomain>https://outlook-addin.atendare.com</AppDomain>
		<AppDomain>https://web.atendare.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://outlook-addin.atendare.com/" />
				<RequestedHeight>450</RequestedHeight>
			</DesktopSettings>
		</Form>
	</FormSettings>

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

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

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

					<!-- Botão ao LER emails -->
					<ExtensionPoint xsi:type="MessageReadCommandSurface">
						<OfficeTab id="TabDefault">
							<Group id="atendare.ReadGroup">
								<Label resid="GroupLabel" />
								<Control xsi:type="Button" id="atendare.ReadButton">
									<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="80" resid="Icon.80x80" />
									</Icon>
									<Action xsi:type="ShowTaskpane">
										<SourceLocation resid="Taskpane.Url" />
									</Action>
								</Control>
							</Group>
						</OfficeTab>
					</ExtensionPoint>

					<!-- Botão ao COMPOR emails -->
					<ExtensionPoint xsi:type="MessageComposeCommandSurface">
						<OfficeTab id="TabDefault">
							<Group id="atendare.ComposeGroup">
								<Label resid="GroupLabel" />
								<Control xsi:type="Button" id="atendare.ComposeButton">
									<Label resid="ComposeButton.Label" />
									<Supertip>
										<Title resid="ComposeButton.Label" />
										<Description resid="ComposeButton.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="Taskpane.Url" />
									</Action>
								</Control>
							</Group>
						</OfficeTab>
					</ExtensionPoint>
				</DesktopFormFactor>
			</Host>
		</Hosts>

		<Resources>
			<bt:Images>
				<bt:Image id="Icon.16x16" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
				<bt:Image id="Icon.32x32" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
				<bt:Image id="Icon.80x80" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
			</bt:Images>
			<bt:Urls>
				<bt:Url id="Commands.Url" DefaultValue="https://outlook-addin.atendare.com/" />
				<bt:Url id="Taskpane.Url" DefaultValue="https://outlook-addin.atendare.com/" />
			</bt:Urls>
			<bt:ShortStrings>
				<bt:String id="GroupLabel" DefaultValue="Atendare" />
				<bt:String id="TaskpaneButton.Label" DefaultValue="Atendare" />
				<bt:String id="ComposeButton.Label" DefaultValue="Modelos Atendare" />
			</bt:ShortStrings>
			<bt:LongStrings>
				<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Abrir painel do Atendare CRM" />
				<bt:String id="ComposeButton.Tooltip" DefaultValue="Inserir modelo de e-mail do Atendare" />
			</bt:LongStrings>
		</Resources>

		<!-- v1.1: habilita o pin do painel (SupportsPinning), necessário para o evento ItemChanged disparar ao trocar de e-mail -->
		<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="Commands.Url" />

						<!-- Botão ao LER emails -->
						<ExtensionPoint xsi:type="MessageReadCommandSurface">
							<OfficeTab id="TabDefault">
								<Group id="atendare.ReadGroup">
									<Label resid="GroupLabel" />
									<Control xsi:type="Button" id="atendare.ReadButton">
										<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="80" resid="Icon.80x80" />
										</Icon>
										<Action xsi:type="ShowTaskpane">
											<SourceLocation resid="Taskpane.Url" />
											<SupportsPinning>true</SupportsPinning>
										</Action>
									</Control>
								</Group>
							</OfficeTab>
						</ExtensionPoint>

						<!-- Botão ao COMPOR emails -->
						<ExtensionPoint xsi:type="MessageComposeCommandSurface">
							<OfficeTab id="TabDefault">
								<Group id="atendare.ComposeGroup">
									<Label resid="GroupLabel" />
									<Control xsi:type="Button" id="atendare.ComposeButton">
										<Label resid="ComposeButton.Label" />
										<Supertip>
											<Title resid="ComposeButton.Label" />
											<Description resid="ComposeButton.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="Taskpane.Url" />
											<SupportsPinning>true</SupportsPinning>
										</Action>
									</Control>
								</Group>
							</OfficeTab>
						</ExtensionPoint>
					</DesktopFormFactor>
				</Host>
			</Hosts>

			<Resources>
				<bt:Images>
					<bt:Image id="Icon.16x16" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
					<bt:Image id="Icon.32x32" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
					<bt:Image id="Icon.80x80" DefaultValue="https://static.files.atendare.com/apps/logos/atendare.png" />
				</bt:Images>
				<bt:Urls>
					<bt:Url id="Commands.Url" DefaultValue="https://outlook-addin.atendare.com/" />
					<bt:Url id="Taskpane.Url" DefaultValue="https://outlook-addin.atendare.com/" />
				</bt:Urls>
				<bt:ShortStrings>
					<bt:String id="GroupLabel" DefaultValue="Atendare" />
					<bt:String id="TaskpaneButton.Label" DefaultValue="Atendare" />
					<bt:String id="ComposeButton.Label" DefaultValue="Modelos Atendare" />
				</bt:ShortStrings>
				<bt:LongStrings>
					<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Abrir painel do Atendare CRM" />
					<bt:String id="ComposeButton.Tooltip" DefaultValue="Inserir modelo de e-mail do Atendare" />
				</bt:LongStrings>
			</Resources>
		</VersionOverrides>
	</VersionOverrides>
</OfficeApp>
