"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.Doc = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _ = require(".");
var _react = require("react");
var _jsxRuntime = require("react/jsx-runtime");
var meta = {
  title: 'Components/LineCopyButton',
  tags: ['autodocs'],
  component: _.LineCopyButton,
  args: {
    styles: {
      display: 'flex'
    }
  },
  argTypes: {}
};
var Doc = exports.Doc = function Doc(props) {
  var styles = props.styles;
  var copyMsg = function copyMsg() {
    alert('click success!');
  };
  var _useState = (0, _react.useState)(false),
    _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
    hover = _useState2[0],
    setHover = _useState2[1];
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    style: {
      display: 'flex',
      flexDirection: 'column',
      padding: 50,
      border: 'solid 0.5px #e5e7eb'
    },
    children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      style: {
        width: 200,
        marginBottom: 50,
        padding: 20,
        display: 'flex',
        flexDirection: 'column',
        backgroundColor: 'aliceblue',
        position: 'relative'
      },
      onMouseEnter: function onMouseEnter() {
        return setHover(true);
      },
      onMouseLeave: function onMouseLeave() {
        return setHover(false);
      },
      children: ["Basic: Left", hover && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LineCopyButton, {
        onCopy: copyMsg
      })]
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      style: {
        width: 200,
        marginBottom: 50,
        padding: 20,
        display: 'flex',
        flexDirection: 'column',
        backgroundColor: 'aliceblue',
        position: 'relative'
      },
      onMouseEnter: function onMouseEnter() {
        return setHover(true);
      },
      onMouseLeave: function onMouseLeave() {
        return setHover(false);
      },
      children: ["Basic: Right:", hover && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LineCopyButton, {
        onCopy: copyMsg,
        direction: 'right'
      })]
    }), "Basic: Left", /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      style: {
        width: 230,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'antiquewhite',
        height: 128
      },
      onMouseEnter: function onMouseEnter() {
        return setHover(true);
      },
      onMouseLeave: function onMouseLeave() {
        return setHover(false);
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        style: {
          display: 'flex',
          flexDirection: 'row',
          justifyContent: 'space-between',
          alignItems: 'center',
          width: 200,
          position: 'relative',
          height: 64,
          background: 'aliceblue'
        },
        children: hover && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LineCopyButton, {
          onCopy: copyMsg
        })
      })
    }), "Basic: Right", /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      style: {
        width: 230,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'antiquewhite',
        height: 128
      },
      onMouseEnter: function onMouseEnter() {
        return setHover(true);
      },
      onMouseLeave: function onMouseLeave() {
        return setHover(false);
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        style: {
          display: 'flex',
          flexDirection: 'row',
          justifyContent: 'space-between',
          alignItems: 'center',
          width: 200,
          position: 'relative',
          height: 64,
          background: 'aliceblue'
        },
        children: hover && /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LineCopyButton, {
          onCopy: copyMsg,
          direction: 'right'
        })
      })
    })]
  });
};
var _default = exports["default"] = meta;