# Setup Wizard Implementation Plan

## Task 1: Create Setup Wizard Component (TS)
- Create `src/app/features/setup-wizard/setup-wizard.component.ts`
- Standalone component with PrimeNG StepperModule, ButtonModule, InputTextModule, SelectModule, InputNumberModule, DatePickerModule, ToastModule
- Inject: FiscalYearService, CurrencyService, AccountService, BankAccountService, WarehouseService, SettingService, MessageService, Router, TranslateService, LanguageService
- Signals: currentStep, loading, stepCompleted (boolean array), created entities
- Load chart of accounts on init for Step 6 dropdowns
- Methods: next(), prev(), createFiscalYear(), createCurrency(), createCashAccount(), createBankAccount(), createWarehouse(), saveAccountSettings(), finishSetup()
- Each create method: validate → call API → on success mark step complete → advance

## Task 2: Create Setup Wizard Template (HTML)
- PrimeNG Stepper with 6 panels
- Step 1: Fiscal year form (name, start_date, end_date with DatePicker)
- Step 2: Currency form (code, name, name_ar, symbol)
- Step 3: Cash account form (name only, auto-creates under parent)
- Step 4: Bank form (bank_name, account_number)
- Step 5: Warehouse form (name, code)
- Step 6: Account settings with grouped dropdowns (accounting/sales/purchases)
- Summary/completion panel with checkmarks
- RTL-friendly layout

## Task 3: Create Setup Wizard Styles (SCSS)
- Card-based step layout matching dark blue + gold theme
- Responsive design
- Step indicators with icons
- Success checkmarks for completed steps

## Task 4: Add Route
- Add `/setup-wizard` route to `src/app/app.routes.ts`
- Guard with `authGuard`

## Task 5: Add Dashboard Redirect Logic
- In dashboard component, check if fiscal years exist
- If none and `system.setup_completed` not set → navigate to `/setup-wizard`

## Task 6: Add Translations
- Add `SETUP_WIZARD.*` keys to both `ar.json` and `en.json`

## Task 7: Add Nav Item (optional)
- Add "Setup Wizard" link in Settings or Core nav group

## Task 8: Build & Deploy
