/**
 * License related type definitions
 */

export type LicenseTier = 'free' | 'pro' | 'agency' | 'enterprise';

export interface LicenseLimits {
  max_variations: number; // -1 = unlimited
  csv_export_limit: number; // -1 = unlimited
  bulk_operations: boolean;
  sku_generator: boolean;
  attribute_manager: boolean;
  performance_tools: boolean;
  white_label: boolean;
  max_domains: number; // -1 = unlimited
}

export interface LicenseUsage {
  variations: number;
  max_variations: number;
  remaining: number | string; // number or 'Korlátlan'
}

export interface LicenseInfo {
  tier: LicenseTier;
  tier_label: string;
  is_active: boolean;
  license_key: string; // Masked (e.g., "XXXX-XXXX-...")
  expires: string;
  limits: LicenseLimits;
  usage: LicenseUsage;
}

export interface LicenseActivationRequest {
  license_key: string;
}

export interface LicenseActivationResponse {
  success: boolean;
  message: string;
  tier?: LicenseTier;
}

export interface LicenseDeactivationResponse {
  success: boolean;
  message: string;
}

export interface FeatureCheckRequest {
  feature: keyof LicenseLimits;
}

export interface FeatureCheckResponse {
  success: boolean;
  data: {
    feature: string;
    available: boolean;
    tier: LicenseTier;
  };
}
