// --- ASA GENERATED START ---
// Plan definitions for payments-basic module.
// --- ASA GENERATED END ---

// --- USER CODE START ---

export type PlanId = 'free' | 'pro';

export interface PlanDefinition {
  id: PlanId;
  name: string;
  price: number;
  stripePriceId: string | null;
  limits: {
    monthlyItems: number;
  };
  features: string[];
}

export const PLANS: Record<PlanId, PlanDefinition> = {
  free: {
    id: 'free',
    name: 'Free',
    price: 0,
    stripePriceId: null,
    limits: {
      monthlyItems: 5,
    },
    features: [
      'Up to 5 items per month',
      'Basic features',
    ],
  },
  pro: {
    id: 'pro',
    name: 'Pro',
    price: 29,
    stripePriceId: process.env.STRIPE_PRO_PRICE_ID || '',
    limits: {
      monthlyItems: Infinity,
    },
    features: [
      'Unlimited items',
      'Priority support',
      'Advanced features',
    ],
  },
};

export function getPlan(planId: string): PlanDefinition {
  return PLANS[planId as PlanId] ?? PLANS.free;
}

// --- USER CODE END ---
