# extractModals

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/utils/modal-extractor.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/utils/modal-extractor.ts#L478)

Extract all modal definitions from both code and template, deduplicating results.

This is the main entry point for modal extraction. It calls both
extractModalsFromCode and extractModalsFromTemplate, then merges
results by name (code-derived modals take priority for metadata).

## Signature

```ts
function extractModals(code: string, templateContent: string | undefined, filePath: string, componentName: string, framework: 'angular' | 'vue' | 'react'): ModalDefinition[]
```

## Parameters

| Name | Type |
|---|---|
| `code` | `string` |
| `templateContent` | `string | undefined` |
| `filePath` | `string` |
| `componentName` | `string` |
| `framework` | `'angular' | 'vue' | 'react'` |

**Returns:** `ModalDefinition[]`
