import _extends from "@babel/runtime/helpers/extends";
import _Collapse from "@alifd/next/es/collapse";
import _Select from "@alifd/next/es/select";
import * as React from 'react';
import { intlLocal } from './locale';
import './index.less';
import StyleSizeSetter from "../../components/style-size-setter";
import StyleItemSetter from "../../components/style-item-setter";
import ColorInput from "../../components/color-input";
var Option = _Select.Option;
var Panel = _Collapse.Panel;
var borderConfig = intlLocal();
var BORDER_MAX = 30;
var BorderRadiusType = /*#__PURE__*/function (BorderRadiusType) {
  BorderRadiusType["fixedBorder"] = "fixedBorder";
  BorderRadiusType["partBorder"] = "partBorder";
  return BorderRadiusType;
}(BorderRadiusType || {});
var BorderDirectionMap = {
  borderLeft: 'borderLeft',
  borderRight: 'borderRight',
  borderTop: 'borderTop',
  borderBottom: 'borderBottom'
  // border:'border'
};
var borderRadiusMap = {
  borderRadius: 'borderRadius',
  borderTopLeftRadius: 'borderTopLeftRadius',
  borderTopRightRadius: 'borderTopRightRadius',
  borderBottomLeftRadius: 'borderBottomLeftRadius',
  borderBottomRightRadius: 'borderBottomRightRadius'
};
export default function BorderV2(props) {
  var styleData = props.styleData,
    onStyleChange = props.onStyleChange;
  return /*#__PURE__*/React.createElement("div", {
    className: "lc-field lc-block-field",
    style: {
      background: "white"
    }
  }, /*#__PURE__*/React.createElement("div", {
    className: "lc-field-head"
  }, "\u8FB9\u6846"), /*#__PURE__*/React.createElement("div", {
    className: "lc-field-body"
  }, /*#__PURE__*/React.createElement(StyleItemSetter.TowColumnLayout, null, /*#__PURE__*/React.createElement(StyleItemSetter, {
    label: "边框式样",
    dataInput: /*#__PURE__*/React.createElement(_Select, {
      hasClear: true,
      dataSource: [{
        value: "solid",
        label: "实线"
      }, {
        value: "dashed",
        label: "虚线"
      }, {
        value: "dotted",
        label: "点线"
      }],
      value: styleData.borderStyle,
      onChange: function onChange(value) {
        onStyleChange === null || onStyleChange === void 0 ? void 0 : onStyleChange([{
          styleKey: "borderStyle",
          value: value
        }]);
      }
    })
  }), /*#__PURE__*/React.createElement(StyleItemSetter, {
    label: "边框宽度",
    dataInput: /*#__PURE__*/React.createElement(StyleSizeSetter, _extends({}, props, {
      styleKey: "borderWidth",
      units: ["px", "%"],
      defaultUint: "px"
    }))
  }), /*#__PURE__*/React.createElement(StyleItemSetter, {
    label: "边框颜色",
    dataInput: /*#__PURE__*/React.createElement(ColorInput, _extends({}, props, {
      styleKey: 'borderColor',
      inputWidth: "100%"
    }))
  }), /*#__PURE__*/React.createElement(StyleItemSetter, {
    label: "圆角",
    dataInput: /*#__PURE__*/React.createElement(StyleSizeSetter, _extends({}, props, {
      styleKey: "borderRadius",
      units: ["px", "%"],
      defaultUint: "px"
    }))
  }))));
}
;