import React from "react";
import { DraggableAttributes } from "@dnd-kit/core";
import { SyntheticListenerMap } from "@dnd-kit/core/dist/hooks/utilities";
import { PointerActivationConstraint } from "@dnd-kit/core/dist/sensors/pointer/AbstractPointerSensor";

//#region src/components/DragSortList/index.d.ts
type IdType = string | number;
interface Props<T> {
  list?: T[];
  onChange?: (list: T[]) => void;
  rowKey: IdType | ((val: T) => IdType);
  activationConstraint?: PointerActivationConstraint;
  children: (params: {
    item: T;
    index: number;
    style: React.CSSProperties;
    props: any;
    setActivatorNodeRef: (element: HTMLElement | null) => void;
    listeners: SyntheticListenerMap;
    attributes: DraggableAttributes;
  }) => React.ReactElement<HTMLElement>;
}
//#endregion
export { Props };