import { E as compilerRuntimeExports, j as jsxRuntimeExports } from "./vendor-react-DYNCg6N5.js";
import { u as useStyles } from "./styles-3NoIlzov.js";
import { c4 as ArrowLeftIcon } from "./index-DfebxkL9.js";
import { at as Modal$1, l as ScrollArea, G as Group, h as ActionIcon } from "./vendor-mantine-h0WlM2Mj.js";
const Modal = (t0) => {
  const $ = compilerRuntimeExports.c(20);
  let children;
  let onBack;
  let onClose;
  let props;
  let title;
  if ($[0] !== t0) {
    ({
      title,
      children,
      onClose,
      onBackClick: onBack,
      ...props
    } = t0);
    $[0] = t0;
    $[1] = children;
    $[2] = onBack;
    $[3] = onClose;
    $[4] = props;
    $[5] = title;
  } else {
    children = $[1];
    onBack = $[2];
    onClose = $[3];
    props = $[4];
    title = $[5];
  }
  const {
    classes
  } = useStyles();
  let t1;
  if ($[6] !== onBack || $[7] !== title) {
    t1 = () => {
      if (!onBack) {
        return title;
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "sm", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(ActionIcon, { onClick: onBack, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeftIcon, {}) }),
        title
      ] });
    };
    $[6] = onBack;
    $[7] = title;
    $[8] = t1;
  } else {
    t1 = $[8];
  }
  const renderTitle = t1;
  let t2;
  if ($[9] !== renderTitle) {
    t2 = renderTitle();
    $[9] = renderTitle;
    $[10] = t2;
  } else {
    t2 = $[10];
  }
  let t3;
  if ($[11] !== classes) {
    t3 = {
      ...classes
    };
    $[11] = classes;
    $[12] = t3;
  } else {
    t3 = $[12];
  }
  let t4;
  if ($[13] !== children || $[14] !== classes.scrollbar || $[15] !== onClose || $[16] !== props || $[17] !== t2 || $[18] !== t3) {
    t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$1, { radius: "md", padding: 0, zIndex: 1400, title: t2, classNames: t3, className: classes.scrollbar, onClose, scrollAreaComponent: ScrollArea.Autosize, ...props, children });
    $[13] = children;
    $[14] = classes.scrollbar;
    $[15] = onClose;
    $[16] = props;
    $[17] = t2;
    $[18] = t3;
    $[19] = t4;
  } else {
    t4 = $[19];
  }
  return t4;
};
export {
  Modal as M
};
//# sourceMappingURL=index-DqcA8P_y.js.map
