export class GeoBlockingModule { private blockedCountries: Set = new Set(); private allowedCountries: Set = new Set(); // If allow-list mode constructor() {} setRules(rules: any[]) { this.blockedCountries.clear(); rules.forEach(rule => { if (rule.type === 'GEO' && rule.enabled) { if (rule.config?.countries) { rule.config.countries.forEach((c: string) => this.blockedCountries.add(c.toUpperCase()) ); } } }); } isBlocked(countryCode: string): boolean { if (!countryCode) return false; return this.blockedCountries.has(countryCode.toUpperCase()); } }