import { jsxs as s, Fragment as C, jsx as n } from "react/jsx-runtime";
import { c as t } from "./index.CfM2L_w0.js";
import { a as u } from "./index.CfQlFjZU.js";
import { B as w } from "./Button.CpTwUWVr.js";
import { S as h } from "./shared.EdGf6tcG.js";
import "react";
const v = "creator_previewButton_IPRs-", B = "creator_hidden_SA0U3", _ = "creator_drawerContainer_w37Ly", f = "creator_drawerChildrenContainer_d6rrA", N = "creator_closeButtonContainer_rnOGn", e = { previewButton: v, hidden: B, drawerContainer: _, drawerChildrenContainer: f, closeButtonContainer: N };
function p({
  children: o,
  isExpanded: r,
  onOpen: a,
  onClose: i
}) {
  return {
    children: o,
    isExpanded: r,
    onOpen: a,
    onClose: i,
    closeButtonContainerClassName: t(e.closeButtonContainer, {
      [e.hidden]: !r
    }),
    drawerContainerClassName: t(e.drawerContainer, {
      [e.hidden]: !r
    }),
    previewButtonClassName: t(e.previewButton, {
      [e.hidden]: r
    }),
    drawerChildrenContainerClassName: t(
      e.drawerChildrenContainer,
      {
        [e.hidden]: !r
      }
    )
  };
}
function P({
  isExpanded: o,
  onOpen: r,
  onClose: a,
  children: i,
  closeButtonContainerClassName: c,
  drawerContainerClassName: l,
  previewButtonClassName: d,
  drawerChildrenContainerClassName: m
}) {
  return /* @__PURE__ */ s(C, { children: [
    /* @__PURE__ */ n("div", { className: c, children: /* @__PURE__ */ n(
      w,
      {
        label: "Close",
        size: "full",
        semantic: h.TERTIARY,
        tabIndex: o ? void 0 : -1,
        onClick: () => {
          a();
        }
      }
    ) }),
    /* @__PURE__ */ s("div", { className: l, children: [
      /* @__PURE__ */ n("button", { className: d, onClick: () => r(), children: /* @__PURE__ */ n("span", { children: "Preview" }) }),
      /* @__PURE__ */ n("div", { className: m, children: i })
    ] })
  ] });
}
const k = u(P, p);
export {
  k as P
};
