import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import React from "react";
import { ReactComponent as IconSvg } from "@svgr/webpack!./round-star_border-24px.svg";
import { i18n } from '@fishx/i18n';
import IconSettings from "./IconSettings";
import { UserOutlined } from '@fishx/icons';
import Icon from "./Icon";
import Action from "./../../elementSettings/components/Action";
import { PreviewBox } from "../../../utils";
import { defaultTarget } from "../../../../config/pluginConfig";
export default (function () {
  return [{
    name: "pb-editor-page-element-icon",
    type: "pb-editor-page-element",
    elementType: "icon",
    toolbar: {
      title: i18n('PAGEBUIDER_SETTINGS_ICON'),
      group: "pb-editor-element-group-basic",
      toolBarPreview: /*#__PURE__*/React.createElement(IconSvg, null),
      preview: function preview() {
        return /*#__PURE__*/React.createElement(PreviewBox, null, /*#__PURE__*/React.createElement(IconSvg, null));
      }
    },
    settings: ["pb-editor-page-element-settings-icon" // "",
    // "pb-editor-page-element-settings-padding",
    // "pb-editor-page-element-settings-margin",
    // [
    //     "pb-editor-page-element-settings-horizontal-align",
    //     { alignments: ["left", "center", "right"] }
    // ],
    // ""
    ],
    target: defaultTarget,
    create: function create(options) {
      return _objectSpread({
        type: "icon",
        elements: [],
        data: {
          componentSettings: {
            icon: /*#__PURE__*/React.createElement(UserOutlined, null),
            width: 50
          },
          settings: {}
        }
      }, options);
    },
    render: function render(props) {
      return /*#__PURE__*/React.createElement(Icon, props);
    }
  }, {
    name: "pb-editor-page-element-settings-icon",
    type: "pb-editor-page-element-settings",
    renderAction: function renderAction() {
      return /*#__PURE__*/React.createElement(Action, {
        hideToolTip: true,
        plugin: this.name
      }, i18n('PAGEBUIDER_SETTINGS_ATTRS'));
    },
    renderMenu: function renderMenu() {
      return /*#__PURE__*/React.createElement(IconSettings, null);
    }
  }];
});
//# sourceMappingURL=index.js.map