import { CSSProperties, ForwardRefExoticComponent, ReactHTML, RefAttributes, Component } from "react"; import { MoveEvent, Options, SortableEvent } from "sortablejs"; /** * Construct a type with the properties of T except for those in type K. * Including this allows for backwards compatibility with earlier versions of TS. */ type Omit = Pick>; export interface ItemInterface { /** The unique id associated with your item. It's recommended this is the same as the key prop for your list item. */ id: string | number; /** When true, the item is selected using MultiDrag */ selected?: boolean; /** When true, the item is deemed "chosen", which basically just a mousedown event. */ chosen?: boolean; /** When true, it will not be possible to pick this item up in the list. */ filtered?: boolean; [property: string]: any; } export interface ReactSortableProps extends ReactSortableOptions, Omit { /** * The list of items to use. */ list: T[]; /** * Sets the state for your list of items. */ setList: (newState: T[], sortable: Sortable | null, store: Store) => void; /** * If parsing in a component WITHOUT a ref, an error will be thrown. * * To fix this, use the `forwardRef` component. * * @example * forwardRef((props, ref) =>