import { Scrollbars } from '@whalecloud/ecommerce';
import { Card } from '@whalecloud/fdx';
import React, { useEffect } from 'react';
import './index.less';
export default function PropertyPanelContainer(props) {
  var typeToTitle = {
    MBanner: 'Banner',
    MSearchBar: 'Search Bar',
    MCarouselSearchBar: 'Search Bar',
    MProductAdvertise: 'Image',
    MGroup: 'Group',
    MCarousel: 'Carousel Banner',
    GalaryTemplate4: '4 Images Banner',
    MCatalogMenu: 'Pages Navigation',
    MScroll: 'Slider Product Recommendation',
    MMultipleBanners: 'Multiple Banners',
    MFlashSales: 'Flash Sales',
    MText: 'Floor Title',
    MProductList: 'Product List',
    MFlashSale: 'Flash Sales',
    MIconGrid: 'Icon Grid',
    MFlashService: 'Flash Service',
    MRecommend: 'Recommendation',
    MMProductList: 'Product List',
    MCouponList: 'Coupon List',
    MImgArea: 'Clickable Area',
    MPageTitle: 'Page Title',
    MGroupParticipants: 'Group Participants',
    MGroupGoods: 'Group Goods',
    MImg: 'Image'
  };
  var changeProperty = props.changeProperty;
  useEffect(function () {
    changeProperty(props);
  }, [props]);
  return /*#__PURE__*/React.createElement("div", {
    className: "propertyPanelContainer"
  }, /*#__PURE__*/React.createElement(Scrollbars, {
    autoHide: true,
    thumbSize: 200
  }, /*#__PURE__*/React.createElement(Card, {
    bordered: false,
    title: typeToTitle[props.type]
  }, props.children)));
}