/**
 * Testes dos novos componentes 3D (M9.6).
 *
 * Valida apenas a estrutura TypeScript (exports e assinaturas),
 * pois os componentes dependem de R3F/three que requerem DOM real.
 */

import { describe, it, expect } from 'vitest';

describe('M9.6 — Sign3D', () => {
  it('Exporta default Sign3DViewer', async () => {
    const mod = await import('../../components/three/Sign3D');
    expect(typeof mod.default).toBe('function');
  });
});

describe('M9.6 — Tower3D', () => {
  it('Exporta default Tower3DViewer', async () => {
    const mod = await import('../../components/three/Tower3D');
    expect(typeof mod.default).toBe('function');
  });
});

describe('M9.6 — Bridge3D', () => {
  it('Exporta default Bridge3DViewer', async () => {
    const mod = await import('../../components/three/Bridge3D');
    expect(typeof mod.default).toBe('function');
  });
});

describe('M9.6 — Bar3D', () => {
  it('Exporta default Bar3DViewer', async () => {
    const mod = await import('../../components/three/Bar3D');
    expect(typeof mod.default).toBe('function');
  });
});

describe('M9.6+ — IsolatedRoof3D', () => {
  it('Exporta default IsolatedRoof3DViewer', async () => {
    const mod = await import('../../components/three/IsolatedRoof3D');
    expect(typeof mod.default).toBe('function');
  });
});

describe('M9.6 — Tipagem forte das entradas', () => {
  it('Sign3DInput força alpha em 0 | 50 | 90', () => {
    const validAlphas: Array<0 | 50 | 90> = [0, 50, 90];
    expect(validAlphas.length).toBe(3);
  });

  it('Tower3DInput força alphaWind em 0 | 45 | 90', () => {
    const validAlphas: Array<0 | 45 | 90> = [0, 45, 90];
    expect(validAlphas.length).toBe(3);
  });

  it('Bar3DInput aceita barType flat ou circular', () => {
    const validTypes: Array<'flat' | 'circular'> = ['flat', 'circular'];
    expect(validTypes.length).toBe(2);
  });

  it('Bar3DInput aceita 5 tipos de seção plana', () => {
    const validSections: Array<'placa' | 'l' | 't' | 'i' | 'rectangle'> = [
      'placa',
      'l',
      't',
      'i',
      'rectangle',
    ];
    expect(validSections.length).toBe(5);
  });
});