import { Ref, WritableComputedRef } from 'vue'; /** * Represents a list item with a unique identifier. * This class is used to wrap data items with a stable key for tracking in reactive lists, * such as drag-and-drop UIs where identity persistence is important. */ declare class ListItem { readonly key: string; data: T; constructor(data: T); /** * Converts an array of plain data into an array of ListItem instances. * @param {T[]} dataset - The raw data array to convert. * @returns {ListItem[]} - Array of ListItems wrapping each data item. */ static fromDataset(dataset: T[]): ListItem[]; /** * Converts an array of ListItem instances back to raw data. * @param {ListItem[]} items - The ListItems to unwrap. * @returns {T[]} - The raw data extracted from the items. */ static toDataset(items: ListItem[]): T[]; } /** * Composable for managing a reactive, sortable list with stable identity keys. * Synchronizes internal list with external v-model binding. * * @template T * @returns Reactive object with the item list and manipulation methods. */ export declare function useListSortable(data: WritableComputedRef | Ref, fallback?: () => T[]): { items: ListItem[]; addItem: (data: T, index?: number) => void; removeItem: (index: number) => void; moveItem: (fromIndex: number, toIndex: number) => void; }; export {};