/*
 * @Author: your name
 * @Date: 2022-04-21 13:59:40
 * @Description:
 * @FilePath: /zl-large-screen/src/components/LargeScreenElement/LargeScreenElementCardList/index.tsx
 */

import React from 'react';

import CardItem from '../../CardItem/index';

import { ILargeScreenElementCardListProps } from '../../../type/LargeScreenElement';

const LargeScreenElementCardList: React.FC<ILargeScreenElementCardListProps> = (
  props
) => {
  const { list, dragStart, doubleClick, sceneEvent, cardMouseDown } = props;
  return (
    <div className="zl-ls-element-card-list">
      {Array.isArray(list) &&
        list?.length > 0 &&
        list.map((item) => (
          <CardItem
            {...item}
            item={item}
            dragStart={dragStart}
            doubleClick={doubleClick}
            sceneEvent={sceneEvent}
            cardMouseDown={cardMouseDown}
          />
        ))}
    </div>
  );
};

export default LargeScreenElementCardList;
