import type { Subscription, SubscriptionTier } from '@shieldai/shared-billing';
import type { EmailNotification, SMSNotification, PushNotification } from '@shieldai/shared-notifications';

export const TestFixtures = {
  users: {
    free: { id: 'user_free', email: 'free@test.com', tier: 'free' as SubscriptionTier },
    basic: { id: 'user_basic', email: 'basic@test.com', tier: 'basic' as SubscriptionTier },
    plus: { id: 'user_plus', email: 'plus@test.com', tier: 'plus' as SubscriptionTier },
    premium: { id: 'user_premium', email: 'premium@test.com', tier: 'premium' as SubscriptionTier },
  },

  subscriptions: {
    basic: {
      id: 'sub_basic_1',
      userId: 'user_basic',
      stripeSubscriptionId: 'sub_123',
      stripeCustomerId: 'cus_123',
      tier: 'basic' as SubscriptionTier,
      status: 'active' as const,
      currentPeriodStart: new Date('2026-04-01'),
      currentPeriodEnd: new Date('2026-05-01'),
      cancelAtPeriodEnd: false,
      createdAt: new Date('2026-04-01'),
      updatedAt: new Date('2026-04-01'),
    } as Subscription,
    plus: {
      id: 'sub_plus_1',
      userId: 'user_plus',
      stripeSubscriptionId: 'sub_456',
      stripeCustomerId: 'cus_456',
      tier: 'plus' as SubscriptionTier,
      status: 'active' as const,
      currentPeriodStart: new Date('2026-04-01'),
      currentPeriodEnd: new Date('2026-05-01'),
      cancelAtPeriodEnd: false,
      createdAt: new Date('2026-04-01'),
      updatedAt: new Date('2026-04-01'),
    } as Subscription,
  },

  notifications: {
    email: {
      channel: 'email' as const,
      to: 'test@example.com',
      subject: 'Test Email',
      htmlBody: '<h1>Test</h1>',
      textBody: 'Test',
      metadata: { source: 'integration-test' },
    } as EmailNotification,
    sms: {
      channel: 'sms' as const,
      to: '+1234567890',
      body: 'Test SMS',
      metadata: { source: 'integration-test' },
    } as SMSNotification,
    push: {
      channel: 'push' as const,
      userId: 'user_plus',
      title: 'Test Push',
      body: 'Test notification',
      data: { type: 'test' },
      badge: 1,
    } as PushNotification,
  },
};
