"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _slateReact = require("slate-react");
require("./index.css");
/* eslint-disable react-hooks/rules-of-hooks */

const renderDivider = _ref => {
  let {
    attributes,
    children,
    element
  } = _ref;
  const isSelected = (0, _slateReact.useSelected)();
  return /*#__PURE__*/_react.default.createElement("div", Object.assign({
    "data-id": element.id,
    className: "sf-divider-container ".concat(isSelected ? 'is-selected' : '')
  }, attributes), /*#__PURE__*/_react.default.createElement("div", {
    className: "sf-divider",
    contentEditable: false
  }), children);
};
var _default = exports.default = renderDivider;