"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DialogExample = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
var _react = _interopRequireWildcard(require("react"));
var _Button = require("../components/Button");
var _Dialog = require("../components/Dialog");
var DialogExample = function DialogExample() {
  var _useState = (0, _react.useState)(false),
    _useState2 = (0, _slicedToArray2.default)(_useState, 2),
    open = _useState2[0],
    setOpen = _useState2[1];
  function confirm() {
    setOpen(!open);
  }
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
    content: /*#__PURE__*/_react.default.createElement("label", null, "Are you sure you want to delete your account?"),
    title: "Dialog",
    appearance: "danger",
    open: open,
    close: function close() {
      setOpen(!open);
    },
    confirm: confirm
  }), /*#__PURE__*/_react.default.createElement(_Button.Button, {
    onClick: function onClick() {
      setOpen(true);
    }
  }, "Open dialog"));
};
exports.DialogExample = DialogExample;