@algorithm-shift/design-system 1.2.70 → 1.2.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28481,10 +28481,12 @@ function DataTable({
28481
28481
  state: {
28482
28482
  columnFilters,
28483
28483
  columnVisibility,
28484
- pagination: {
28485
- pageIndex: controlledPageIndex ?? 0,
28486
- pageSize
28487
- }
28484
+ ...paginationMode === "server" ? {
28485
+ pagination: {
28486
+ pageIndex: controlledPageIndex ?? 0,
28487
+ pageSize
28488
+ }
28489
+ } : {}
28488
28490
  },
28489
28491
  onColumnFiltersChange: setColumnFilters,
28490
28492
  onColumnVisibilityChange: setColumnVisibility,
@@ -28493,11 +28495,13 @@ function DataTable({
28493
28495
  getPaginationRowModel: pagination && paginationMode === "client" ? (0, import_react_table.getPaginationRowModel)() : void 0,
28494
28496
  manualPagination: paginationMode === "server",
28495
28497
  pageCount: paginationMode === "server" ? Math.ceil(totalRecords / pageSize) : void 0,
28496
- onPaginationChange: (updater) => {
28497
- const prev = table.getState().pagination;
28498
- const next = typeof updater === "function" ? updater(prev) : updater;
28499
- onPageChange?.(next.pageIndex, next.pageSize);
28500
- }
28498
+ ...paginationMode === "server" ? {
28499
+ onPaginationChange: (updater) => {
28500
+ const prev = table.getState().pagination;
28501
+ const next = typeof updater === "function" ? updater(prev) : updater;
28502
+ onPageChange?.(next.pageIndex, next.pageSize);
28503
+ }
28504
+ } : {}
28501
28505
  });
28502
28506
  const getPageNumbers = (currentPage, totalPages, maxVisiblePages = 5) => {
28503
28507
  if (totalPages <= maxVisiblePages) {
@@ -28982,8 +28986,126 @@ var Pagination_default = CustomPagination;
28982
28986
 
28983
28987
  // src/components/Navigation/Tabs/Tabs.tsx
28984
28988
  var import_link5 = __toESM(require("next/link"));
28989
+ var import_navigation3 = require("next/navigation");
28990
+
28991
+ // src/components/ui/dialog.tsx
28992
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
28985
28993
  var import_jsx_runtime51 = require("react/jsx-runtime");
28986
- var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
28994
+ function Dialog({
28995
+ ...props
28996
+ }) {
28997
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
28998
+ }
28999
+ function DialogPortal({
29000
+ ...props
29001
+ }) {
29002
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
29003
+ }
29004
+ function DialogOverlay({
29005
+ className,
29006
+ ...props
29007
+ }) {
29008
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29009
+ DialogPrimitive.Overlay,
29010
+ {
29011
+ "data-slot": "dialog-overlay",
29012
+ className: cn(
29013
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[60] bg-black/50",
29014
+ className
29015
+ ),
29016
+ ...props
29017
+ }
29018
+ );
29019
+ }
29020
+ function DialogContent({
29021
+ className,
29022
+ children,
29023
+ showCloseButton = true,
29024
+ ...props
29025
+ }) {
29026
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
29027
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogOverlay, {}),
29028
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29029
+ DialogPrimitive.Content,
29030
+ {
29031
+ "data-slot": "dialog-content",
29032
+ className: cn(
29033
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
29034
+ className
29035
+ ),
29036
+ ...props,
29037
+ children: [
29038
+ children,
29039
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29040
+ DialogPrimitive.Close,
29041
+ {
29042
+ "data-slot": "dialog-close",
29043
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
29044
+ children: [
29045
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(X, {}),
29046
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "sr-only", children: "Close" })
29047
+ ]
29048
+ }
29049
+ )
29050
+ ]
29051
+ }
29052
+ )
29053
+ ] });
29054
+ }
29055
+ function DialogHeader({ className, ...props }) {
29056
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29057
+ "div",
29058
+ {
29059
+ "data-slot": "dialog-header",
29060
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
29061
+ ...props
29062
+ }
29063
+ );
29064
+ }
29065
+ function DialogFooter({ className, ...props }) {
29066
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29067
+ "div",
29068
+ {
29069
+ "data-slot": "dialog-footer",
29070
+ className: cn(
29071
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
29072
+ className
29073
+ ),
29074
+ ...props
29075
+ }
29076
+ );
29077
+ }
29078
+ function DialogTitle({
29079
+ className,
29080
+ ...props
29081
+ }) {
29082
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29083
+ DialogPrimitive.Title,
29084
+ {
29085
+ "data-slot": "dialog-title",
29086
+ className: cn("text-lg leading-none font-semibold", className),
29087
+ ...props
29088
+ }
29089
+ );
29090
+ }
29091
+ function DialogDescription({
29092
+ className,
29093
+ ...props
29094
+ }) {
29095
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29096
+ DialogPrimitive.Description,
29097
+ {
29098
+ "data-slot": "dialog-description",
29099
+ className: cn("text-muted-foreground text-sm", className),
29100
+ ...props
29101
+ }
29102
+ );
29103
+ }
29104
+
29105
+ // src/components/Navigation/Tabs/Tabs.tsx
29106
+ var import_react26 = require("react");
29107
+ var import_jsx_runtime52 = require("react/jsx-runtime");
29108
+ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = true }) => {
28987
29109
  const rawTabs = Array.isArray(tabs) ? tabs : [];
28988
29110
  const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
28989
29111
  const activeClasses = "bg-white/10 text-white";
@@ -28992,26 +29114,45 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
28992
29114
  if (!path) return false;
28993
29115
  return pathname === path || path !== "/" && pathname?.startsWith(path);
28994
29116
  };
29117
+ const router = (0, import_navigation3.useRouter)();
29118
+ const [showExitDialog, setShowExitDialog] = (0, import_react26.useState)(false);
29119
+ const [pendingUrl, setPendingUrl] = (0, import_react26.useState)(null);
29120
+ const handleBuilderExit = (0, import_react26.useCallback)(
29121
+ (e, url) => {
29122
+ if (isBuilder) {
29123
+ e.preventDefault();
29124
+ setPendingUrl(url);
29125
+ setShowExitDialog(true);
29126
+ }
29127
+ },
29128
+ [isBuilder]
29129
+ );
29130
+ const confirmExit = () => {
29131
+ if (pendingUrl) {
29132
+ setShowExitDialog(false);
29133
+ router.push(pendingUrl);
29134
+ }
29135
+ };
28995
29136
  const renderDesktopTab = (tab, index) => {
28996
29137
  const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
28997
29138
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
28998
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
28999
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29139
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29140
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29000
29141
  tab.header,
29001
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29142
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29002
29143
  ] }),
29003
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29144
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29004
29145
  DropdownMenuContent,
29005
29146
  {
29006
29147
  align: "start",
29007
29148
  sideOffset: 6,
29008
29149
  className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
29009
- children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29150
+ children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29010
29151
  DropdownMenuItem,
29011
29152
  {
29012
29153
  asChild: true,
29013
29154
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
29014
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
29155
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29015
29156
  },
29016
29157
  item.id
29017
29158
  ))
@@ -29019,14 +29160,24 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29019
29160
  )
29020
29161
  ] }, index);
29021
29162
  }
29022
- return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
29163
+ return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29164
+ import_link5.default,
29165
+ {
29166
+ href: tab.url,
29167
+ className: finalClasses,
29168
+ style: tab.style,
29169
+ onClick: (e) => handleBuilderExit(e, tab.url || "#"),
29170
+ children: tab.header
29171
+ },
29172
+ index
29173
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
29023
29174
  };
29024
- const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
29025
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
29026
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Menu, { className: "h-4 w-4" }),
29175
+ const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29176
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuTrigger, { className: "flex items-center gap-2 px-3 py-2 rounded-md bg-white/10 text-white text-sm", children: [
29177
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Menu, { className: "h-4 w-4" }),
29027
29178
  "Menu"
29028
29179
  ] }),
29029
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29180
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29030
29181
  DropdownMenuContent,
29031
29182
  {
29032
29183
  align: "start",
@@ -29035,25 +29186,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29035
29186
  children: rawTabs.map((tab, i) => {
29036
29187
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
29037
29188
  if (hasChildren) {
29038
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuSub, { children: [
29039
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
29040
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29189
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuSub, { children: [
29190
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuSubTrigger, { className: "flex items-center justify-between cursor-pointer rounded-sm px-3 py-2 text-[13px] text-foreground hover:text-foreground", children: tab.header }),
29191
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DropdownMenuSubContent, { className: "bg-white border shadow-lg rounded-md p-1", children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29041
29192
  DropdownMenuItem,
29042
29193
  {
29043
29194
  asChild: true,
29044
29195
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
29045
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
29196
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29046
29197
  },
29047
29198
  item.id
29048
29199
  )) })
29049
29200
  ] }, i);
29050
29201
  }
29051
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29202
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29052
29203
  DropdownMenuItem,
29053
29204
  {
29054
29205
  asChild: true,
29055
29206
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
29056
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: tab.url || "#", children: tab.header })
29207
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
29057
29208
  },
29058
29209
  i
29059
29210
  );
@@ -29063,55 +29214,84 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29063
29214
  ] });
29064
29215
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
29065
29216
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
29066
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className, style, children: [
29067
- forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
29068
- forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
29217
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
29218
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className, style, children: [
29219
+ forceDesktop !== void 0 ? forceDesktop && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `flex gap-2 ${verticalMenu ? "flex-col items-start" : "flex-row"}`, children: rawTabs.map(renderDesktopTab) }) }),
29220
+ forceMobile !== void 0 ? forceMobile && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { children: renderMobileMenu() }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex md:hidden", children: renderMobileMenu() })
29221
+ ] }),
29222
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29223
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogHeader, { children: [
29224
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogTitle, { children: "Exit Builder?" }),
29225
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29226
+ ] }),
29227
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogFooter, { children: [
29228
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29229
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29230
+ ] })
29231
+ ] }) })
29069
29232
  ] });
29070
29233
  };
29071
29234
  var Tabs_default = Tabs;
29072
29235
 
29073
29236
  // src/components/Navigation/Stages/Stages.tsx
29074
- var import_react26 = __toESM(require("react"));
29075
- var import_jsx_runtime52 = require("react/jsx-runtime");
29076
- var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
29077
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
29078
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
29079
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react26.default.Fragment, { children: [
29080
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29237
+ var import_react27 = __toESM(require("react"));
29238
+ var import_jsx_runtime53 = require("react/jsx-runtime");
29239
+ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange }) => {
29240
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
29241
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
29242
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react27.default.Fragment, { children: [
29243
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29081
29244
  "button",
29082
29245
  {
29083
29246
  className: `min-w-[120px] px-4 py-2 rounded-full text-sm font-medium transition-colors duration-200 whitespace-nowrap ${stage.isActive ? "bg-[#034486] text-white shadow-md" : "bg-white text-gray-700 hover:bg-gray-100 border border-gray-200"}`,
29247
+ onClick: () => {
29248
+ if (onStageChange) {
29249
+ onStageChange(stage.id);
29250
+ }
29251
+ },
29084
29252
  children: stage.header
29085
29253
  }
29086
29254
  ),
29087
- index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29255
+ index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29088
29256
  ] }, stage.id)) }),
29089
- isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
29257
+ isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29258
+ "button",
29259
+ {
29260
+ className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
29261
+ onClick: () => {
29262
+ const activeStage = stages?.find((stage) => stage.isActive);
29263
+ if (activeStage && onStageChange) {
29264
+ onStageChange(activeStage.id);
29265
+ }
29266
+ },
29267
+ children: buttonText
29268
+ }
29269
+ ) })
29090
29270
  ] }) });
29091
29271
  };
29092
29272
  var Stages_default = StagesComponent;
29093
29273
 
29094
29274
  // src/components/Navigation/Spacer/Spacer.tsx
29095
- var import_jsx_runtime53 = require("react/jsx-runtime");
29275
+ var import_jsx_runtime54 = require("react/jsx-runtime");
29096
29276
  var Spacer = ({ className, style }) => {
29097
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `${className}`, style });
29277
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `${className}`, style });
29098
29278
  };
29099
29279
  var Spacer_default = Spacer;
29100
29280
 
29101
29281
  // src/components/Navigation/Profile/Profile.tsx
29102
- var import_jsx_runtime54 = require("react/jsx-runtime");
29282
+ var import_jsx_runtime55 = require("react/jsx-runtime");
29103
29283
 
29104
29284
  // src/components/Navigation/Notification/Notification.tsx
29105
- var import_jsx_runtime55 = require("react/jsx-runtime");
29285
+ var import_jsx_runtime56 = require("react/jsx-runtime");
29106
29286
 
29107
29287
  // src/components/Navigation/Logo/Logo.tsx
29108
- var import_jsx_runtime56 = require("react/jsx-runtime");
29288
+ var import_jsx_runtime57 = require("react/jsx-runtime");
29109
29289
 
29110
29290
  // src/components/ui/avatar.tsx
29111
29291
  var React9 = __toESM(require("react"));
29112
29292
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
29113
- var import_jsx_runtime57 = require("react/jsx-runtime");
29114
- var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29293
+ var import_jsx_runtime58 = require("react/jsx-runtime");
29294
+ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29115
29295
  AvatarPrimitive.Root,
29116
29296
  {
29117
29297
  ref,
@@ -29123,7 +29303,7 @@ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
29123
29303
  }
29124
29304
  ));
29125
29305
  Avatar.displayName = AvatarPrimitive.Root.displayName;
29126
- var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29306
+ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29127
29307
  AvatarPrimitive.Image,
29128
29308
  {
29129
29309
  ref,
@@ -29132,7 +29312,7 @@ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
29132
29312
  }
29133
29313
  ));
29134
29314
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
29135
- var AvatarFallback = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29315
+ var AvatarFallback = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29136
29316
  AvatarPrimitive.Fallback,
29137
29317
  {
29138
29318
  ref,
@@ -29148,8 +29328,10 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
29148
29328
  // src/components/Navigation/Navbar/Navbar.tsx
29149
29329
  var import_link6 = __toESM(require("next/link"));
29150
29330
  var import_image3 = __toESM(require("next/image"));
29331
+ var import_navigation4 = require("next/navigation");
29151
29332
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
29152
- var import_jsx_runtime58 = require("react/jsx-runtime");
29333
+ var import_react28 = require("react");
29334
+ var import_jsx_runtime59 = require("react/jsx-runtime");
29153
29335
  function Navbar({
29154
29336
  style,
29155
29337
  badgeType,
@@ -29162,111 +29344,165 @@ function Navbar({
29162
29344
  canvasMode = "desktop",
29163
29345
  list = [],
29164
29346
  profileMenu = [],
29165
- userName = "Guest User"
29347
+ userName = "Guest User",
29348
+ isBuilder = true,
29349
+ source,
29350
+ navList
29166
29351
  }) {
29167
29352
  const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
29168
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("nav", { className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm", style, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
29169
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" }) }),
29170
- !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29171
- import_link6.default,
29353
+ const router = (0, import_navigation4.useRouter)();
29354
+ const [showExitDialog, setShowExitDialog] = (0, import_react28.useState)(false);
29355
+ const [pendingUrl, setPendingUrl] = (0, import_react28.useState)(null);
29356
+ const handleBuilderExit = (0, import_react28.useCallback)(
29357
+ (e, url) => {
29358
+ if (isBuilder) {
29359
+ e.preventDefault();
29360
+ setPendingUrl(url);
29361
+ setShowExitDialog(true);
29362
+ }
29363
+ },
29364
+ [isBuilder]
29365
+ );
29366
+ const confirmExit = () => {
29367
+ if (pendingUrl) {
29368
+ setShowExitDialog(false);
29369
+ router.push(pendingUrl);
29370
+ }
29371
+ };
29372
+ const formatedMenu = (0, import_react28.useMemo)(() => {
29373
+ if (source === "state" && navList && navList.length) {
29374
+ return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
29375
+ }
29376
+ return list || [];
29377
+ }, [source, navList]);
29378
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29379
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29380
+ "nav",
29172
29381
  {
29173
- href: item.url || "#",
29174
- className: "text-sm font-medium dark:text-white text-gray-600 hover:text-gray-900 transition-colors",
29175
- children: item.header
29176
- },
29177
- item.id
29178
- )) }),
29179
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-3", children: [
29180
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
29181
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
29182
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29183
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29184
- Button,
29185
- {
29186
- variant: "ghost",
29187
- size: "icon",
29188
- className: "border border-gray-400",
29189
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
29190
- }
29191
- ),
29192
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29193
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
29194
- badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
29195
- ] }),
29196
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
29197
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-2", children: [
29198
- !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29199
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
29200
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29201
- AvatarImage,
29202
- {
29203
- src: "/images/appbuilder/toolset/profile.svg",
29204
- alt: "Profile"
29205
- }
29206
- ) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
29207
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29208
- Button,
29209
- {
29210
- variant: "ghost",
29211
- size: "icon",
29212
- className: "text-gray-900 md:hidden dark:invert",
29213
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
29214
- }
29215
- )
29216
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29217
- Button,
29382
+ className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
29383
+ style,
29384
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
29385
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29386
+ import_link6.default,
29218
29387
  {
29219
- variant: "ghost",
29220
- size: "icon",
29221
- className: "text-gray-900 dark:invert",
29222
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
29388
+ href: "/",
29389
+ onClick: (e) => handleBuilderExit(e, "/"),
29390
+ className: "flex items-center space-x-2",
29391
+ children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_image3.default, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-semibold text-blue-700", children: "Logo" })
29223
29392
  }
29224
- )
29225
- ] }) }),
29226
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29227
- profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) }),
29228
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "md:hidden", children: [
29229
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29230
- list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_link6.default, { href: item.url || "#", children: item.header }) }, item.id)) })
29393
+ ),
29394
+ !isMobileView && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex items-center space-x-6 sm:hidden md:flex", children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29395
+ import_link6.default,
29396
+ {
29397
+ href: item.url || "#",
29398
+ onClick: (e) => handleBuilderExit(e, item.url),
29399
+ className: "text-sm font-medium dark:text-white text-gray-600 hover:text-gray-900 transition-colors",
29400
+ children: item.header
29401
+ },
29402
+ item.id
29403
+ )) }),
29404
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-3", children: [
29405
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-1 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
29406
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 dark:text-white text-gray-400" }),
29407
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29408
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", className: "border border-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Search, { className: "h-5 w-5 text-gray-400" }) }),
29409
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29410
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Bell, { className: "h-5 w-5 text-[#1C1B1F] dark:text-gray-400" }) }),
29411
+ badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && Number(badgeCount) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
29412
+ ] }),
29413
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenu, { children: [
29414
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-2", children: [
29415
+ !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29416
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29417
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29418
+ AvatarImage,
29419
+ {
29420
+ src: "/images/appbuilder/toolset/profile.svg",
29421
+ alt: "Profile"
29422
+ }
29423
+ ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: userName && getInitials(userName) }) }),
29424
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29425
+ Button,
29426
+ {
29427
+ variant: "ghost",
29428
+ size: "icon",
29429
+ className: "text-gray-900 md:hidden dark:invert",
29430
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-6 w-6" })
29431
+ }
29432
+ )
29433
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "ghost", size: "icon", className: "text-gray-900 dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-6 w-6" }) })
29434
+ ] }) }),
29435
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29436
+ profileMenu && profileMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: profileMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29437
+ import_link6.default,
29438
+ {
29439
+ href: item.url || "#",
29440
+ onClick: (e) => handleBuilderExit(e, item.url),
29441
+ children: item.header
29442
+ }
29443
+ ) }, item.id)) }),
29444
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "md:hidden", children: [
29445
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29446
+ formatedMenu && formatedMenu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: formatedMenu.map((item) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DropdownMenuItem, { className: "text-black dark:invert", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29447
+ import_link6.default,
29448
+ {
29449
+ href: item.url || "#",
29450
+ onClick: (e) => handleBuilderExit(e, item.url),
29451
+ children: item.header
29452
+ }
29453
+ ) }, item.id)) })
29454
+ ] })
29455
+ ] })
29456
+ ] })
29231
29457
  ] })
29232
29458
  ] })
29459
+ }
29460
+ ),
29461
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29462
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogHeader, { children: [
29463
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogTitle, { children: "Exit Builder?" }),
29464
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29465
+ ] }),
29466
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogFooter, { children: [
29467
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29468
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29233
29469
  ] })
29234
- ] })
29235
- ] }) });
29470
+ ] }) })
29471
+ ] });
29236
29472
  }
29237
29473
 
29238
29474
  // src/components/Chart/BarChart.tsx
29239
- var import_react27 = __toESM(require("react"));
29475
+ var import_react29 = __toESM(require("react"));
29240
29476
  var import_recharts = require("recharts");
29241
- var import_jsx_runtime59 = require("react/jsx-runtime");
29477
+ var import_jsx_runtime60 = require("react/jsx-runtime");
29242
29478
  var ChartComponent = ({ className, style, loading, ...props }) => {
29243
29479
  const data = Array.isArray(props.data) ? props.data : [];
29244
29480
  const chartType = props.chartType || "bar";
29245
29481
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
29246
29482
  if (loading || data.length === 0) {
29247
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29483
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29248
29484
  "div",
29249
29485
  {
29250
29486
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29251
29487
  style,
29252
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29488
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29253
29489
  }
29254
29490
  );
29255
29491
  }
29256
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_recharts.BarChart, { data, title: "Leads", desc: "content", children: [
29257
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29258
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29259
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
29260
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29261
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29262
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29492
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `${className} h-[400px]`, style, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts.BarChart, { data, title: "Leads", desc: "content", children: [
29493
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29494
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29495
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29496
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29497
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29498
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29263
29499
  import_recharts.Bar,
29264
29500
  {
29265
29501
  dataKey: "value",
29266
29502
  fill: "#00695C",
29267
29503
  radius: [6, 6, 0, 0],
29268
29504
  isAnimationActive: false,
29269
- children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29505
+ children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29270
29506
  "rect",
29271
29507
  {
29272
29508
  fill: entry.color || "#00695C"
@@ -29275,16 +29511,16 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
29275
29511
  ))
29276
29512
  }
29277
29513
  )
29278
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_recharts.AreaChart, { data, children: [
29279
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
29280
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29281
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29514
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts.AreaChart, { data, children: [
29515
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
29516
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29517
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29282
29518
  ] }) }),
29283
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29284
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29285
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
29286
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29287
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29519
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29520
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29521
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29522
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29523
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29288
29524
  import_recharts.Area,
29289
29525
  {
29290
29526
  type: "monotone",
@@ -29297,12 +29533,12 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
29297
29533
  )
29298
29534
  ] }) }) });
29299
29535
  };
29300
- var BarChart_default = import_react27.default.memo(ChartComponent);
29536
+ var BarChart_default = import_react29.default.memo(ChartComponent);
29301
29537
 
29302
29538
  // src/components/Chart/PieChart.tsx
29303
- var import_react28 = __toESM(require("react"));
29539
+ var import_react30 = __toESM(require("react"));
29304
29540
  var import_recharts2 = require("recharts");
29305
- var import_jsx_runtime60 = require("react/jsx-runtime");
29541
+ var import_jsx_runtime61 = require("react/jsx-runtime");
29306
29542
  var getRandomColor = () => {
29307
29543
  const palette = [
29308
29544
  "#2563eb",
@@ -29322,51 +29558,57 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29322
29558
  const showLegends = props.showLegends ?? true;
29323
29559
  const labelType = props.labelType || "inside";
29324
29560
  const canvasMode = props.canvasMode;
29325
- const data = (0, import_react28.useMemo)(() => {
29561
+ const data = (0, import_react30.useMemo)(() => {
29326
29562
  if (!Array.isArray(props.data)) return [];
29327
29563
  return props.data.map((item) => ({ ...item, color: getRandomColor() }));
29328
29564
  }, [props.data]);
29329
- const total = (0, import_react28.useMemo)(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
29565
+ const total = (0, import_react30.useMemo)(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
29330
29566
  const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
29331
- const renderLegends = (0, import_react28.useMemo)(() => {
29567
+ const [mounted, setMounted] = (0, import_react30.useState)(false);
29568
+ (0, import_react30.useEffect)(() => {
29569
+ const timeout = setTimeout(() => setMounted(true), 100);
29570
+ return () => clearTimeout(timeout);
29571
+ }, []);
29572
+ const renderLegends = (0, import_react30.useMemo)(() => {
29332
29573
  if (!showLegends) return null;
29333
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29574
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29334
29575
  "div",
29335
29576
  {
29336
29577
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
29337
29578
  children: [
29338
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29579
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29339
29580
  "span",
29340
29581
  {
29341
29582
  className: "inline-block w-[16px] h-[16px] rounded",
29342
29583
  style: { backgroundColor: d.color }
29343
29584
  }
29344
29585
  ),
29345
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29586
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29346
29587
  ]
29347
29588
  },
29348
29589
  d.name
29349
29590
  )) });
29350
29591
  }, [data, showLegends]);
29592
+ if (!mounted) return null;
29351
29593
  if (loading || data.length === 0) {
29352
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29594
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29353
29595
  "div",
29354
29596
  {
29355
29597
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29356
29598
  style,
29357
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29599
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "text-gray-400 text-sm md:text-base", children: loading ? "Loading chart report..." : "No data available to display the chart." })
29358
29600
  }
29359
29601
  );
29360
29602
  }
29361
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29603
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29362
29604
  "div",
29363
29605
  {
29364
29606
  className: `relative flex flex-col items-center ${className}`,
29365
29607
  style,
29366
29608
  children: [
29367
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
29368
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts2.PieChart, { children: [
29369
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29609
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
29610
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.ResponsiveContainer, { width: "99%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_recharts2.PieChart, { children: [
29611
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29370
29612
  import_recharts2.Pie,
29371
29613
  {
29372
29614
  data,
@@ -29378,8 +29620,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29378
29620
  labelLine: false,
29379
29621
  isAnimationActive: false,
29380
29622
  children: [
29381
- data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29382
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29623
+ data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29624
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29383
29625
  import_recharts2.LabelList,
29384
29626
  {
29385
29627
  dataKey: "value",
@@ -29392,14 +29634,14 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29392
29634
  ]
29393
29635
  }
29394
29636
  ),
29395
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29637
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29396
29638
  import_recharts2.Tooltip,
29397
29639
  {
29398
29640
  formatter: (value, name) => [`${value}k`, name]
29399
29641
  }
29400
29642
  )
29401
29643
  ] }) }),
29402
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29644
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29403
29645
  "div",
29404
29646
  {
29405
29647
  className: `absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${forceMobile ? "text-2xl" : "text-4xl"} font-bold text-[#000]`,
@@ -29410,18 +29652,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29410
29652
  }
29411
29653
  )
29412
29654
  ] }),
29413
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29655
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29414
29656
  ]
29415
29657
  }
29416
29658
  );
29417
29659
  };
29418
- var PieChart_default = import_react28.default.memo(DonutChart);
29660
+ var PieChart_default = import_react30.default.memo(DonutChart);
29419
29661
 
29420
29662
  // src/components/Blocks/EmailComposer.tsx
29421
- var import_jsx_runtime61 = require("react/jsx-runtime");
29663
+ var import_jsx_runtime62 = require("react/jsx-runtime");
29422
29664
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
29423
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
29424
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29665
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
29666
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29425
29667
  "input",
29426
29668
  {
29427
29669
  type: "email",
@@ -29430,8 +29672,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29430
29672
  required: true
29431
29673
  }
29432
29674
  ) }),
29433
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center gap-2", children: [
29434
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29675
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-2", children: [
29676
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29435
29677
  "input",
29436
29678
  {
29437
29679
  type: "email",
@@ -29442,7 +29684,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29442
29684
  required: true
29443
29685
  }
29444
29686
  ),
29445
- !showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29687
+ !showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29446
29688
  "button",
29447
29689
  {
29448
29690
  onClick: () => setShowCc?.(true),
@@ -29450,7 +29692,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29450
29692
  children: "Cc"
29451
29693
  }
29452
29694
  ),
29453
- !showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29695
+ !showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29454
29696
  "button",
29455
29697
  {
29456
29698
  onClick: () => setShowBcc?.(true),
@@ -29459,7 +29701,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29459
29701
  }
29460
29702
  )
29461
29703
  ] }) }),
29462
- showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29704
+ showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29463
29705
  "input",
29464
29706
  {
29465
29707
  type: "text",
@@ -29469,7 +29711,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29469
29711
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29470
29712
  }
29471
29713
  ) }),
29472
- showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29714
+ showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29473
29715
  "input",
29474
29716
  {
29475
29717
  type: "text",
@@ -29479,7 +29721,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29479
29721
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29480
29722
  }
29481
29723
  ) }),
29482
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29724
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29483
29725
  "input",
29484
29726
  {
29485
29727
  type: "text",
@@ -29489,11 +29731,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29489
29731
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29490
29732
  }
29491
29733
  ) }),
29492
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29493
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex justify-end gap-2", children: [
29494
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29495
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29496
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29734
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29735
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex justify-end gap-2", children: [
29736
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29737
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29738
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29497
29739
  ] })
29498
29740
  ] }) });
29499
29741
  }
@@ -29538,10 +29780,10 @@ function showSonnerToast({
29538
29780
  // src/components/ui/sonner.tsx
29539
29781
  var import_next_themes = require("next-themes");
29540
29782
  var import_sonner2 = require("sonner");
29541
- var import_jsx_runtime62 = require("react/jsx-runtime");
29783
+ var import_jsx_runtime63 = require("react/jsx-runtime");
29542
29784
  var Toaster = ({ ...props }) => {
29543
29785
  const { theme = "system" } = (0, import_next_themes.useTheme)();
29544
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29786
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29545
29787
  import_sonner2.Toaster,
29546
29788
  {
29547
29789
  theme,