"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isGCPtenant = isGCPtenant;
/**
 * Returns true if the current hostname matches the GCP tenant pattern.
 * GCP tenants follow the pattern: <name>-cdp-<cdp-id>.jira-dev.com
 *
 * CDN (CloudFront) is an AWS service and is not available on GCP tenants.
 * This function is used to gate CDN delivery, mirroring the isIsolatedCloud() pattern.
 *
 * @param hostname - Optional hostname override (defaults to globalThis.location?.hostname). Used for testing.
 */
function isGCPtenant(hostname) {
  var _location;
  var host = hostname !== null && hostname !== void 0 ? hostname : typeof globalThis !== 'undefined' ? (_location = globalThis.location) === null || _location === void 0 ? void 0 : _location.hostname : undefined;
  if (!host) {
    return false;
  }
  var gcpTenantPattern = /^.*-cdp-\w+\.jira-dev\.com$/;
  return gcpTenantPattern.test(host);
}