Skip to content

usePipItems

PIP item management composable.

Import

typescript
const {
  pipItems,
  selectedItem,
  isLoading,
  fetchPipItems,
  selectItem,
  updateItem,
  getItemMatches,
} = usePipItems(projectId)

Parameters

ParameterTypeDescription
projectIdRef<string>Reactive project UUID

Return Values

PropertyTypeDescription
pipItemsRef<PipItem[]>List of PIP items for the project
selectedItemRef<PipItem | null>Currently selected item
isLoadingRef<boolean>Loading state
matchCountsComputedRef<Record<string, number>>Match counts per item

Methods

MethodParametersReturnsDescription
fetchPipItemsPromise<void>Load all PIP items
selectItemitem: PipItemvoidSelect a PIP item
updateItemid: string, data: Partial<PipItem>Promise<void>Update item fields
getItemMatchesitemId: stringPromise<Match[]>Get matches for an item

Source

app/composables/usePipItems.ts

Built with VitePress