/**
 * Vue consent context — injection key + shape.
 *
 * Phase 4: extracted from vue/index.ts.
 */

import type { InjectionKey, Ref } from 'vue';
import type { ConsentManager } from '../core/ConsentManager';
import type {
  ConsentCategories,
  ConsentCategory,
  ConsentState,
} from '../types';

export interface ConsentContext {
  manager: Ref<ConsentManager | null>;
  consent: Ref<ConsentState | null>;
  isInitialized: Ref<boolean>;
  isLoading: Ref<boolean>;
  isBannerVisible: Ref<boolean>;
  needsConsent: Ref<boolean>;
  hasConsent: (category: ConsentCategory) => boolean;
  acceptAll: () => Promise<void>;
  rejectAll: () => Promise<void>;
  saveSelection: (categories: Partial<ConsentCategories>) => Promise<void>;
  showBanner: () => void;
  hideBanner: () => void;
  showSettings: () => void;
}

export const CONSENT_KEY: InjectionKey<ConsentContext> = Symbol('consent');
