import { createUID } from '@pega/cosmos-react-core';
import { StyledDemoDragDropListItem, StyledEmptyItem } from './DragDropList.styles';
export const createMockDataArray = (length, type, listId) => {
    return Array.from({ length }, (_, i) => {
        const id = `${i}`;
        return {
            type,
            id: createUID(),
            data: {
                content: `Item ${listId}:${id}`,
                color: `hsl(${(i * 360) / length}deg, 100%, 66%)`
            }
        };
    });
};
export const EmptyItem = () => {
    return <StyledEmptyItem>No Items</StyledEmptyItem>;
};
export const DemoListItem = ({ id, type, dragRef, data, isDragging, ...restProps }) => {
    return (<StyledDemoDragDropListItem ref={dragRef} style={{
            opacity: isDragging ? '0.5' : undefined,
            backgroundColor: data?.color ?? 'white'
        }} {...restProps}>
      {data?.content}
    </StyledDemoDragDropListItem>);
};
export const sort = (a, b) => {
    return a.data.content.localeCompare(b.data.content);
};
export const itemType = Symbol('');
export const mockDataArrayA = createMockDataArray(10, itemType, 'A');
export const mockDataArrayB = createMockDataArray(4, itemType, 'B');
//# sourceMappingURL=DragDropList.mocks.jsx.map