import React from "react";
import { connect } from "../../../redux";
import { Collapse } from '@whalecloud/fdx';
import { i18n } from '@fishx/i18n';
import styled from "styled-components";
import { getActiveElement, getElementWithChildren } from "../../../selectors";
import { toolCollapseAttr } from "../../../utils";
import CommonStyleSettings from "../../elements/components/CommonStyleSettings";
var Panel = Collapse.Panel;
var FormContainer = /*#__PURE__*/styled('div', {
  target: "e7n3i6a0",
  label: "FormContainer"
})({
  padding: 5
});
var DATA_NAMESPACE = "data.componentSettings";

var HeaderCellSettings = function HeaderCellSettings(_ref) {
  var ele = _ref.ele,
      element = _ref.element,
      updateElement = _ref.updateElement;
  return /*#__PURE__*/React.createElement(FormContainer, null, /*#__PURE__*/React.createElement(Collapse, Object.assign({}, toolCollapseAttr, {
    defaultActiveKey: ['1', '2', '3']
  }), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS'),
    key: "1"
  }, /*#__PURE__*/React.createElement(CommonStyleSettings, null))));
};

var mapDispatchToProps = function mapDispatchToProps(dispatch) {
  return {
    updateElement: function updateElement(payload) {
      dispatch({
        type: 'appBuilder/updateAndFlattenElement',
        payload: payload
      });
    }
  };
};

export default connect(function (state) {
  var element = getActiveElement(state);
  var ele = getElementWithChildren(state, element.id);
  return {
    element: element,
    ele: ele
  };
}, mapDispatchToProps)(HeaderCellSettings);
//# sourceMappingURL=Settings.js.map