'use strict';

const jsxRuntime = require('react/jsx-runtime');
const React = require('react');
const reactIcons_esm = require('../../../../../../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
const toolbarButton = require('../toolbar-button.cjs');
const dialog = require('../../../dialog.cjs');
const imageEditBlock = require('./image-edit-block.cjs');

const ImageEditDialog = ({ editor, size, variant }) => {
  const [open, setOpen] = React.useState(false);
  return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog, { open, onOpenChange: setOpen, children: [
    /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
      toolbarButton.ToolbarButton,
      {
        isActive: editor.isActive("image"),
        tooltip: "Image",
        "aria-label": "Image",
        size,
        variant,
        children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons_esm.ImageIcon, { className: "size-5" })
      }
    ) }),
    /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "sm:max-w-lg", children: [
      /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { children: [
        /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: "Select image" }),
        /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { className: "sr-only", children: "Upload an image from your computer" })
      ] }),
      /* @__PURE__ */ jsxRuntime.jsx(imageEditBlock.ImageEditBlock, { editor, close: () => setOpen(false) })
    ] })
  ] });
};

exports.ImageEditDialog = ImageEditDialog;
