import * as plugins from '../loint-reception.plugins.js';

export type TSupportedCurrency = 'EUR';

export interface IBillableItem {
  name: string;
  monthlyPrice: number;
  currency: TSupportedCurrency;
  from: number;
  to: number;
  factoredOn30DayMonth: number;
  quantity: number;
}

export interface IBillingPlan {
  id: string;
  data: {
    type: 'Paddle' | 'AppSumo' | 'FairUsageFree' | 'Enterprise' | 'Internal' | 'Testing';
    proEnabled: boolean;
    organizationId: string;
    lastProcessed: number;
    seats: number;
    status: 'active' | 'activeOverdue' | 'pausedOverdue' | 'inactive' | 'suspended';
    paddleData?: {
      checkoutId: string;
    };
    alternativePaymentData?: {
      enterprise: boolean;
      appSumoCode: string;
    };
    nextBilling: {
      items: Array<IBillableItem>;
      method: 'paddle';
      ontrack: boolean;
      errorText?: string;
      selectedBillingDate: number;
    };
    billingEvents: Array<{
      timestamp: number;
      amount: number;
      currency: TSupportedCurrency;
      billedItems: Array<IBillableItem>;
      checkoutLink?: string;
    }>;
    communications: Array<any>;
  };
}
