import * as React from "react";

import EditorObject from "@sc/modules/page/Builder/EditorObject";
import { PluginProps } from "./types";
import PropertiesBuilder from "@sc/modules/v2/Properties/components/generator";
import { ShareButton } from "./live";
import _ from "lodash";
import buttonSettings from "./settings";

/**
 * Share Button
 */
export const EditorShareButton: React.FC<PluginProps> = (props) => {
  const { id, mode, settings } = props;
  const { properties } = buttonSettings;

  return (
    <EditorObject
      title="Button"
      id={id}
      {...props}
      PropertiesView={() => <PropertiesBuilder data={properties} {...props} />}
    >
      <ShareButton {...settings} />
    </EditorObject>
  );
};

export default EditorShareButton;
