function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { forwardRef, useMemo, useRef } from 'react';
import { useImperativeHandle } from 'react';
import BookingDashboardComponent from "../../../../booking/dashboard";
import "./index.less";
var BookingDashboard = /*#__PURE__*/forwardRef(function (props, ref) {
  var bookingTimeStartBetween = props.bookingTimeStartBetween;
  var bookingDashboardRef = useRef(null);
  var cptProps = useMemo(function () {
    return {
      style: {
        padding: '16px'
      },
      otherParams: {
        booking_time_start_between: bookingTimeStartBetween
      },
      backgroundColors: ['rgba(224, 79, 22, 0.20)', 'rgba(217, 45, 32, 0.14)', 'rgba(127, 86, 217, 0.22)', 'rgba(7, 148, 85, 0.20)', 'rgba(21, 112, 239, 0.23)', 'rgba(202, 133, 4, 0.20)', 'var(--Gray-800, #1D2939)', 'var(--Gray-true-800, #292929)']
    };
  }, [bookingTimeStartBetween]);
  useImperativeHandle(ref, function () {
    return {
      refresh: function refresh() {
        var _bookingDashboardRef$;
        (_bookingDashboardRef$ = bookingDashboardRef.current) === null || _bookingDashboardRef$ === void 0 || _bookingDashboardRef$.refresh();
      }
    };
  });
  return /*#__PURE__*/React.createElement(BookingDashboardComponent, _extends({
    className: "pisell-ticket-booking-dashboard pisell-lowcode-statistic-list-wrap",
    ref: bookingDashboardRef
  }, cptProps));
});
export default BookingDashboard;