/**
 * Angular IConsentService — interface for DI.
 *
 * Phase 4: extracted from angular/index.ts.
 */

import type {
  ConsentCategories,
  ConsentCategory,
  ConsentState,
} from '../types';

/**
 * ConsentService Interface fuer Angular DI
 *
 * @example
 * ```typescript
 * @Component({...})
 * export class MyComponent {
 *   constructor(private consent: ConsentService) {
 *     if (this.consent.hasConsent('analytics')) {
 *       // Analytics laden
 *     }
 *   }
 * }
 * ```
 */
export interface IConsentService {
  /** Initialisiert? */
  readonly isInitialized: boolean;

  /** Laedt noch? */
  readonly isLoading: boolean;

  /** Banner sichtbar? */
  readonly isBannerVisible: boolean;

  /** Aktueller Consent-Zustand */
  readonly consent: ConsentState | null;

  /** Muss Consent eingeholt werden? */
  readonly needsConsent: boolean;

  /** Prueft Consent fuer Kategorie */
  hasConsent(category: ConsentCategory): boolean;

  /** Alle akzeptieren */
  acceptAll(): Promise<void>;

  /** Alle ablehnen */
  rejectAll(): Promise<void>;

  /** Auswahl speichern */
  saveSelection(categories: Partial<ConsentCategories>): Promise<void>;

  /** Banner anzeigen */
  showBanner(): void;

  /** Banner ausblenden */
  hideBanner(): void;

  /** Einstellungen oeffnen */
  showSettings(): void;
}
