/**
 * Sales Module - Fresh Start
 * 
 * Complete rebuild of the Sales module following the modular architecture pattern
 * established by the Purchases module.
 * 
 * This implementation includes:
 * ✅ Domain Layer - Pure business logic
 * ✅ Application Layer - Service + Ports for abstraction
 * ✅ Infrastructure Layer - JSON adapter for persistence (Postgres coming next)
 * ✅ App Layer - Page routing and UI placeholders
 * ✅ Server Actions - Next.js integration points
 * 
 * Directory Structure:
 * 
 * lib/modules/sales/
 * ├── domain/
 * │   ├── sales-invoice.model.ts         (Type definitions)
 * │   └── sales-invoice.domain.ts        (Pure business logic)
 * ├── application/
 * │   ├── sales-invoice-repository.ts    (Repository interface)
 * │   ├── sales-accounting.port.ts       (Accounting Port)
 * │   ├── sales-side-effects.port.ts     (Side Effects Port)
 * │   ├── sales-reference-data.port.ts   (Reference Data Port)
 * │   ├── sales-id-generator.port.ts     (ID Generator Port)
 * │   └── sales-invoice-application-service.ts (Main Service)
 * ├── infrastructure/
 * │   ├── sales-invoice-json-adapter.ts  (JSON Persistence)
 * │   ├── default-sales-accounting.port.ts
 * │   ├── default-sales-side-effects.port.ts
 * │   ├── default-sales-reference-data.port.ts
 * │   ├── default-sales-id-generator.port.ts
 * │   └── sales-module-factory.ts        (DI Factory)
 * └── index.ts                            (Barrel exports)
 * 
 * lib/actions/
 * └── sales-invoice.actions.ts            (Server Actions)
 * 
 * app/admin/sales/
 * ├── layout.tsx                         (Navigation)
 * ├── page.tsx                           (Create Invoice)
 * ├── history/page.tsx                   (List Invoices)
 * ├── view/[id]/page.tsx                 (View Detail)
 * ├── edit/[id]/page.tsx                 (Edit Invoice)
 * ├── payment/received/page.tsx          (Record Payments)
 * ├── returns/page.tsx                   (Manage Returns)
 * ├── debit-notes/page.tsx               (Issue Debit Notes)
 * ├── balances/page.tsx                  (Customer Balances)
 * ├── statement/page.tsx                 (Account Statement)
 * └── shipped/page.tsx                   (Shipped Invoices)
 * 
 * components/admin/sales/
 * ├── sales-invoice-form.tsx             (Form - Placeholder)
 * └── sales-invoice-history.tsx          (List - Placeholder)
 * 
 * === DEVELOPMENT ROADMAP ===
 * 
 * Phase 1 (Current): ✅ COMPLETE
 * - Set up domain model and business logic
 * - Create application service with 5 ports
 * - Build JSON adapter (dev/testing)
 * - Create basic server actions
 * - Set up routing and page structure
 * 
 * Phase 2 (Next):
 * - Implement SalesInvoiceForm component (use shared components)
 * - Implement SalesInvoiceHistory with search/filtering
 * - Build detail view and edit pages
 * - Add tests (domain + contract + service)
 * 
 * Phase 3 (Later):
 * - Build payment received page
 * - Build returns management
 * - Build debit notes
 * - Build customer balance and statement pages
 * 
 * Phase 4 (Future):
 * - PostgreSQL adapter
 * - Advanced features (revenue recognition, etc)
 * 
 * === USAGE ===
 * 
 * // In server components:
 * import { handleCreateSalesInvoice } from '@/lib/actions/sales-invoice.actions';
 * 
 * // In client components:
 * 'use client';
 * import { handleCreateSalesInvoice } from '@/lib/actions/sales-invoice.actions';
 * 
 * const result = await handleCreateSalesInvoice({
 *   customerId: '123',
 *   date: '2024-01-15',
 *   items: [...],
 *   // etc
 * });
 * 
 * // Direct service access (for background jobs, etc):
 * import { getSalesInvoiceService } from '@/lib/modules/sales';
 * const service = getSalesInvoiceService();
 * const invoice = await service.create({...});
 */

export {};
