usePipItems
PIP item management composable.
Import
typescript
const {
pipItems,
selectedItem,
isLoading,
fetchPipItems,
selectItem,
updateItem,
getItemMatches,
} = usePipItems(projectId)Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | Ref<string> | Reactive project UUID |
Return Values
| Property | Type | Description |
|---|---|---|
pipItems | Ref<PipItem[]> | List of PIP items for the project |
selectedItem | Ref<PipItem | null> | Currently selected item |
isLoading | Ref<boolean> | Loading state |
matchCounts | ComputedRef<Record<string, number>> | Match counts per item |
Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
fetchPipItems | — | Promise<void> | Load all PIP items |
selectItem | item: PipItem | void | Select a PIP item |
updateItem | id: string, data: Partial<PipItem> | Promise<void> | Update item fields |
getItemMatches | itemId: string | Promise<Match[]> | Get matches for an item |
Source
app/composables/usePipItems.ts