//#region src/auth/support-copilot-platforms.ts
/**
* Ordered alphabetically by label for deterministic UI rendering.
*/
const SUPPORT_COPILOT_PLATFORMS = [
	{
		slug: "atlas",
		label: "Atlas",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "atlas_conversation",
			hostGlob: "app.atlas.so",
			pathPattern: "^/conversations/(?<ticketId>[a-zA-Z0-9-]+)"
		}]
	},
	{
		slug: "freshdesk",
		label: "Freshdesk",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "freshdesk_ticket",
			hostGlob: "*.freshdesk.com",
			pathPattern: "^/a/tickets/(?<ticketId>\\d+)"
		}]
	},
	{
		slug: "front",
		label: "Front",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "front_conversation",
			hostGlob: "app.frontapp.com",
			pathPattern: "^/inbox/.+/open/(?<ticketId>[a-z0-9]+)"
		}]
	},
	{
		slug: "github",
		label: "GitHub",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "github_issue",
			hostGlob: "github.com",
			pathPattern: "^/[^/]+/[^/]+/issues/(?<ticketId>\\d+)"
		}]
	},
	{
		slug: "helpscout",
		label: "Help Scout",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "helpscout_conversation",
			hostGlob: "secure.helpscout.net",
			pathPattern: "^/conversation/(?<ticketId>\\d+)"
		}]
	},
	{
		slug: "intercom",
		label: "Intercom",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "intercom_conversation",
			hostGlob: "app.intercom.com",
			pathPattern: "^/a/inbox/.+/conversation/(?<ticketId>\\d+)"
		}]
	},
	{
		slug: "jira",
		label: "Jira",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "jira_issue",
			hostGlob: "*.atlassian.net",
			pathPattern: "^/browse/(?<ticketId>[A-Z]+-\\d+)"
		}]
	},
	{
		slug: "missive",
		label: "Missive",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "missive_conversation",
			hostGlob: "mail.missiveapp.com",
			pathPattern: "^/(?<ticketId>[a-f0-9-]+)"
		}]
	},
	{
		slug: "plain",
		label: "Plain",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "plain_thread",
			hostGlob: "app.plain.com",
			pathPattern: "^/thread/(?<ticketId>[a-zA-Z0-9-]+)"
		}]
	},
	{
		slug: "salesforce",
		label: "Salesforce",
		credentialRequired: true,
		pageMatchers: [{
			pageType: "salesforce_case",
			hostGlob: "*.lightning.force.com",
			pathPattern: "^/lightning/r/Case/(?<ticketId>[a-zA-Z0-9]+)"
		}]
	},
	{
		slug: "zendesk",
		label: "Zendesk",
		credentialRequired: false,
		pageMatchers: [{
			pageType: "zendesk_ticket",
			hostGlob: "*.zendesk.com",
			pathPattern: "^/agent/tickets/(?<ticketId>\\d+)"
		}]
	}
];
const SUPPORT_COPILOT_PLATFORM_SLUGS = SUPPORT_COPILOT_PLATFORMS.map((p) => p.slug);

//#endregion
export { SUPPORT_COPILOT_PLATFORMS, SUPPORT_COPILOT_PLATFORM_SLUGS };