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

describe("Phase 0 scaffold files", () => {
  it("ShippingAddressStep exports a named component", async () => {
    const mod = await import(
      "../../components/checkout/steps/ShippingAddressStep"
    );
    expect(mod.ShippingAddressStep).toBeDefined();
    expect(typeof mod.ShippingAddressStep).toBe("function");
  });

  it("AddressSelector exports a named component", async () => {
    const mod = await import(
      "../../components/checkout/content/AddressSelector"
    );
    expect(mod.AddressSelector).toBeDefined();
    expect(typeof mod.AddressSelector).toBe("function");
  });

  it("AddressForm exports a named component", async () => {
    const mod = await import(
      "../../components/checkout/content/AddressForm"
    );
    expect(mod.AddressForm).toBeDefined();
    expect(typeof mod.AddressForm).toBe("function");
  });

  it("AddressValidationFeedback exports a named component", async () => {
    const mod = await import(
      "../../components/checkout/content/AddressValidationFeedback"
    );
    expect(mod.AddressValidationFeedback).toBeDefined();
    expect(typeof mod.AddressValidationFeedback).toBe("function");
  });

  it("useAddressValidation exports a hook function", async () => {
    const mod = await import("./useAddressValidation");
    expect(mod.useAddressValidation).toBeDefined();
    expect(typeof mod.useAddressValidation).toBe("function");
  });

  it("barrel index re-exports address types", async () => {
    const mod = await import("./index");
    expect(mod).toBeDefined();
  });
});
