import { describe, expect, it } from 'vitest';
import { resolveWatermarkFeatureKey } from '../Packages';

describe('resolveWatermarkFeatureKey', () => {
  it('returns package-specific labels for endcustomer tiers', () => {
    expect(resolveWatermarkFeatureKey({ slug: 'starter' } as any)).toBe('watermark_base');
    expect(resolveWatermarkFeatureKey({ slug: 'standard' } as any)).toBe('no_watermark');
    expect(resolveWatermarkFeatureKey({ slug: 'pro' } as any)).toBe('watermark_custom');
  });

  it('falls back to watermark_allowed when slug is unknown', () => {
    expect(resolveWatermarkFeatureKey({ slug: 'reseller', watermark_allowed: true } as any)).toBe('watermark');
    expect(resolveWatermarkFeatureKey({ slug: 'reseller', watermark_allowed: false } as any)).toBe('no_watermark');
  });
});
