import React from "react";
import { i18n } from '@fishx/i18n';
import { connect } from "../../../redux";
import styled from "styled-components";
import { Collapse } from '@whalecloud/fdx';
import { getActiveElementWithChildren } from "../../../selectors";
import BackgroundSettings from "../background/Settings";
import BorderSettings from "../border/Settings";
import HorizontalAlignFlex from "../align/HorizontalAlignFlex";
import VerticalAlign from "../align/VerticalAlignAction";
import WidthSetting from "../../elements/components/WidthSetting";
import HeightSetting from "../../elements/components/HeightSetting";
import PMSettings from "../components/PMSettings";
import { toolCollapseAttr } from "../../../utils";
import CommonStyleSettings from "../../elements/components/CommonStyleSettings";
/**
 * rowSet
 * 设置行属性
 */

var Panel = Collapse.Panel;
var FormContainer = /*#__PURE__*/styled("div", {
  target: "e994lon0",
  label: "FormContainer"
})({
  padding: 5
});

var Settings = function Settings(props) {
  return /*#__PURE__*/React.createElement(FormContainer, null, /*#__PURE__*/React.createElement(Collapse, Object.assign({}, toolCollapseAttr, {
    defaultActiveKey: ['1', '2', '3', '4', '5', '6']
  }), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS'),
    key: "1"
  }, /*#__PURE__*/React.createElement(WidthSetting, null), /*#__PURE__*/React.createElement(HeightSetting, null), /*#__PURE__*/React.createElement(CommonStyleSettings, null)), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS_BACKGROUND'),
    key: "2"
  }, /*#__PURE__*/React.createElement(BackgroundSettings, null)), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS_BORDERED'),
    key: "3"
  }, /*#__PURE__*/React.createElement(BorderSettings, null)), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS_PADDING'),
    key: "4"
  }, /*#__PURE__*/React.createElement(PMSettings, {
    styleAttribute: "padding"
  })), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS_MARGIN'),
    key: "5"
  }, /*#__PURE__*/React.createElement(PMSettings, {
    styleAttribute: "margin"
  })), /*#__PURE__*/React.createElement(Panel, {
    header: i18n('PAGEBUIDER_SETTINGS_LAYOUT'),
    key: "6"
  }, /*#__PURE__*/React.createElement(HorizontalAlignFlex, null), /*#__PURE__*/React.createElement(VerticalAlign, null))));
};

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

export default connect(function (state) {
  return {
    element: getActiveElementWithChildren(state)
  };
}, mapDispatchToProps)(Settings);
//# sourceMappingURL=Settings.js.map