@algorithm-shift/design-system 1.2.71 → 1.2.73

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
@@ -28469,7 +28469,8 @@ function DataTable({
28469
28469
  onSortChange,
28470
28470
  onFilterChange,
28471
28471
  onGlobalSearch,
28472
- globalSearch
28472
+ globalSearch,
28473
+ onCellClick
28473
28474
  }) {
28474
28475
  const [columnFilters, setColumnFilters] = React7.useState([]);
28475
28476
  const [columnVisibility, setColumnVisibility] = React7.useState({});
@@ -28682,7 +28683,24 @@ function DataTable({
28682
28683
  ] })
28683
28684
  ] }) }, header.id);
28684
28685
  }) }, hg.id)) }),
28685
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) })
28686
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => {
28687
+ const meta = cell.column.columnDef.meta || {};
28688
+ const isClickable = meta?.isClickable;
28689
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
28690
+ TableCell,
28691
+ {
28692
+ className: `${meta?.cellClass ?? ""} ${isClickable ? "cursor-pointer hover:bg-gray-100 underline" : ""}`,
28693
+ style: meta?.cellStyle,
28694
+ onClick: () => {
28695
+ if (isClickable && onCellClick) {
28696
+ onCellClick(cell.row.original, cell.column.id);
28697
+ }
28698
+ },
28699
+ children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
28700
+ },
28701
+ cell.id
28702
+ );
28703
+ }) }, row.id)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) })
28686
28704
  ] }),
28687
28705
  pagination && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between py-3 px-2 text-sm w-full", children: [
28688
28706
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
@@ -28986,8 +29004,126 @@ var Pagination_default = CustomPagination;
28986
29004
 
28987
29005
  // src/components/Navigation/Tabs/Tabs.tsx
28988
29006
  var import_link5 = __toESM(require("next/link"));
29007
+ var import_navigation3 = require("next/navigation");
29008
+
29009
+ // src/components/ui/dialog.tsx
29010
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
28989
29011
  var import_jsx_runtime51 = require("react/jsx-runtime");
28990
- var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29012
+ function Dialog({
29013
+ ...props
29014
+ }) {
29015
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
29016
+ }
29017
+ function DialogPortal({
29018
+ ...props
29019
+ }) {
29020
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
29021
+ }
29022
+ function DialogOverlay({
29023
+ className,
29024
+ ...props
29025
+ }) {
29026
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29027
+ DialogPrimitive.Overlay,
29028
+ {
29029
+ "data-slot": "dialog-overlay",
29030
+ className: cn(
29031
+ "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",
29032
+ className
29033
+ ),
29034
+ ...props
29035
+ }
29036
+ );
29037
+ }
29038
+ function DialogContent({
29039
+ className,
29040
+ children,
29041
+ showCloseButton = true,
29042
+ ...props
29043
+ }) {
29044
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
29045
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogOverlay, {}),
29046
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29047
+ DialogPrimitive.Content,
29048
+ {
29049
+ "data-slot": "dialog-content",
29050
+ className: cn(
29051
+ "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",
29052
+ className
29053
+ ),
29054
+ ...props,
29055
+ children: [
29056
+ children,
29057
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
29058
+ DialogPrimitive.Close,
29059
+ {
29060
+ "data-slot": "dialog-close",
29061
+ 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",
29062
+ children: [
29063
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(X, {}),
29064
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "sr-only", children: "Close" })
29065
+ ]
29066
+ }
29067
+ )
29068
+ ]
29069
+ }
29070
+ )
29071
+ ] });
29072
+ }
29073
+ function DialogHeader({ className, ...props }) {
29074
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29075
+ "div",
29076
+ {
29077
+ "data-slot": "dialog-header",
29078
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
29079
+ ...props
29080
+ }
29081
+ );
29082
+ }
29083
+ function DialogFooter({ className, ...props }) {
29084
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29085
+ "div",
29086
+ {
29087
+ "data-slot": "dialog-footer",
29088
+ className: cn(
29089
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
29090
+ className
29091
+ ),
29092
+ ...props
29093
+ }
29094
+ );
29095
+ }
29096
+ function DialogTitle({
29097
+ className,
29098
+ ...props
29099
+ }) {
29100
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29101
+ DialogPrimitive.Title,
29102
+ {
29103
+ "data-slot": "dialog-title",
29104
+ className: cn("text-lg leading-none font-semibold", className),
29105
+ ...props
29106
+ }
29107
+ );
29108
+ }
29109
+ function DialogDescription({
29110
+ className,
29111
+ ...props
29112
+ }) {
29113
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29114
+ DialogPrimitive.Description,
29115
+ {
29116
+ "data-slot": "dialog-description",
29117
+ className: cn("text-muted-foreground text-sm", className),
29118
+ ...props
29119
+ }
29120
+ );
29121
+ }
29122
+
29123
+ // src/components/Navigation/Tabs/Tabs.tsx
29124
+ var import_react26 = require("react");
29125
+ var import_jsx_runtime52 = require("react/jsx-runtime");
29126
+ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode, isBuilder = true }) => {
28991
29127
  const rawTabs = Array.isArray(tabs) ? tabs : [];
28992
29128
  const baseClasses = "text-[12px] text-foreground p-2 text-center rounded-md transition-colors";
28993
29129
  const activeClasses = "bg-white/10 text-white";
@@ -28996,26 +29132,45 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
28996
29132
  if (!path) return false;
28997
29133
  return pathname === path || path !== "/" && pathname?.startsWith(path);
28998
29134
  };
29135
+ const router = (0, import_navigation3.useRouter)();
29136
+ const [showExitDialog, setShowExitDialog] = (0, import_react26.useState)(false);
29137
+ const [pendingUrl, setPendingUrl] = (0, import_react26.useState)(null);
29138
+ const handleBuilderExit = (0, import_react26.useCallback)(
29139
+ (e, url) => {
29140
+ if (isBuilder) {
29141
+ e.preventDefault();
29142
+ setPendingUrl(url);
29143
+ setShowExitDialog(true);
29144
+ }
29145
+ },
29146
+ [isBuilder]
29147
+ );
29148
+ const confirmExit = () => {
29149
+ if (pendingUrl) {
29150
+ setShowExitDialog(false);
29151
+ router.push(pendingUrl);
29152
+ }
29153
+ };
28999
29154
  const renderDesktopTab = (tab, index) => {
29000
29155
  const finalClasses = [baseClasses, isActive(tab.url) ? activeClasses : hoverClasses, tab.className || ""].join(" ");
29001
29156
  if (Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown) {
29002
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
29003
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29157
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29158
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuTrigger, { className: `${finalClasses} inline-flex items-center gap-1`, children: [
29004
29159
  tab.header,
29005
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29160
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
29006
29161
  ] }),
29007
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29162
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29008
29163
  DropdownMenuContent,
29009
29164
  {
29010
29165
  align: "start",
29011
29166
  sideOffset: 6,
29012
29167
  className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
29013
- children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29168
+ children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29014
29169
  DropdownMenuItem,
29015
29170
  {
29016
29171
  asChild: true,
29017
29172
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
29018
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
29173
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29019
29174
  },
29020
29175
  item.id
29021
29176
  ))
@@ -29023,14 +29178,24 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29023
29178
  )
29024
29179
  ] }, index);
29025
29180
  }
29026
- 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);
29181
+ return tab.url ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29182
+ import_link5.default,
29183
+ {
29184
+ href: tab.url,
29185
+ className: finalClasses,
29186
+ style: tab.style,
29187
+ onClick: (e) => handleBuilderExit(e, tab.url || "#"),
29188
+ children: tab.header
29189
+ },
29190
+ index
29191
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
29027
29192
  };
29028
- const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenu, { children: [
29029
- /* @__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: [
29030
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Menu, { className: "h-4 w-4" }),
29193
+ const renderMobileMenu = () => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenu, { children: [
29194
+ /* @__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: [
29195
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Menu, { className: "h-4 w-4" }),
29031
29196
  "Menu"
29032
29197
  ] }),
29033
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29198
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29034
29199
  DropdownMenuContent,
29035
29200
  {
29036
29201
  align: "start",
@@ -29039,25 +29204,25 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29039
29204
  children: rawTabs.map((tab, i) => {
29040
29205
  const hasChildren = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
29041
29206
  if (hasChildren) {
29042
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DropdownMenuSub, { children: [
29043
- /* @__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 }),
29044
- /* @__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)(
29207
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DropdownMenuSub, { children: [
29208
+ /* @__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 }),
29209
+ /* @__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)(
29045
29210
  DropdownMenuItem,
29046
29211
  {
29047
29212
  asChild: true,
29048
29213
  className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100",
29049
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: item.url || "#", children: item.header })
29214
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: item.url || "#", onClick: (e) => handleBuilderExit(e, item.url || "#"), children: item.header })
29050
29215
  },
29051
29216
  item.id
29052
29217
  )) })
29053
29218
  ] }, i);
29054
29219
  }
29055
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
29220
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29056
29221
  DropdownMenuItem,
29057
29222
  {
29058
29223
  asChild: true,
29059
29224
  className: "cursor-pointer rounded-sm px-3 py-2 text-[13px] text-gray-800 hover:bg-gray-100",
29060
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_link5.default, { href: tab.url || "#", children: tab.header })
29225
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_link5.default, { href: tab.url || "#", onClick: (e) => handleBuilderExit(e, tab.url || "#"), children: tab.header })
29061
29226
  },
29062
29227
  i
29063
29228
  );
@@ -29067,55 +29232,84 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
29067
29232
  ] });
29068
29233
  const forceMobile = canvasMode ? canvasMode === "mobile" || canvasMode === "tablet" : void 0;
29069
29234
  const forceDesktop = canvasMode ? canvasMode === "desktop" : void 0;
29070
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className, style, children: [
29071
- 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) }) }),
29072
- 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() })
29235
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
29236
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className, style, children: [
29237
+ 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) }) }),
29238
+ 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() })
29239
+ ] }),
29240
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29241
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogHeader, { children: [
29242
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogTitle, { children: "Exit Builder?" }),
29243
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29244
+ ] }),
29245
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(DialogFooter, { children: [
29246
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29247
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29248
+ ] })
29249
+ ] }) })
29073
29250
  ] });
29074
29251
  };
29075
29252
  var Tabs_default = Tabs;
29076
29253
 
29077
29254
  // src/components/Navigation/Stages/Stages.tsx
29078
- var import_react26 = __toESM(require("react"));
29079
- var import_jsx_runtime52 = require("react/jsx-runtime");
29080
- var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
29081
- 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: [
29082
- /* @__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" }) }) }) }),
29083
- /* @__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: [
29084
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
29255
+ var import_react27 = __toESM(require("react"));
29256
+ var import_jsx_runtime53 = require("react/jsx-runtime");
29257
+ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style, onStageChange }) => {
29258
+ 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: [
29259
+ /* @__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" }) }) }) }),
29260
+ /* @__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: [
29261
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29085
29262
  "button",
29086
29263
  {
29087
29264
  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"}`,
29265
+ onClick: () => {
29266
+ if (onStageChange) {
29267
+ onStageChange(stage.id);
29268
+ }
29269
+ },
29088
29270
  children: stage.header
29089
29271
  }
29090
29272
  ),
29091
- index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29273
+ index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
29092
29274
  ] }, stage.id)) }),
29093
- 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 }) })
29275
+ isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
29276
+ "button",
29277
+ {
29278
+ className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm",
29279
+ onClick: () => {
29280
+ const activeStage = stages?.find((stage) => stage.isActive);
29281
+ if (activeStage && onStageChange) {
29282
+ onStageChange(activeStage.id);
29283
+ }
29284
+ },
29285
+ children: buttonText
29286
+ }
29287
+ ) })
29094
29288
  ] }) });
29095
29289
  };
29096
29290
  var Stages_default = StagesComponent;
29097
29291
 
29098
29292
  // src/components/Navigation/Spacer/Spacer.tsx
29099
- var import_jsx_runtime53 = require("react/jsx-runtime");
29293
+ var import_jsx_runtime54 = require("react/jsx-runtime");
29100
29294
  var Spacer = ({ className, style }) => {
29101
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: `${className}`, style });
29295
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `${className}`, style });
29102
29296
  };
29103
29297
  var Spacer_default = Spacer;
29104
29298
 
29105
29299
  // src/components/Navigation/Profile/Profile.tsx
29106
- var import_jsx_runtime54 = require("react/jsx-runtime");
29300
+ var import_jsx_runtime55 = require("react/jsx-runtime");
29107
29301
 
29108
29302
  // src/components/Navigation/Notification/Notification.tsx
29109
- var import_jsx_runtime55 = require("react/jsx-runtime");
29303
+ var import_jsx_runtime56 = require("react/jsx-runtime");
29110
29304
 
29111
29305
  // src/components/Navigation/Logo/Logo.tsx
29112
- var import_jsx_runtime56 = require("react/jsx-runtime");
29306
+ var import_jsx_runtime57 = require("react/jsx-runtime");
29113
29307
 
29114
29308
  // src/components/ui/avatar.tsx
29115
29309
  var React9 = __toESM(require("react"));
29116
29310
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
29117
- var import_jsx_runtime57 = require("react/jsx-runtime");
29118
- var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29311
+ var import_jsx_runtime58 = require("react/jsx-runtime");
29312
+ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29119
29313
  AvatarPrimitive.Root,
29120
29314
  {
29121
29315
  ref,
@@ -29127,7 +29321,7 @@ var Avatar = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
29127
29321
  }
29128
29322
  ));
29129
29323
  Avatar.displayName = AvatarPrimitive.Root.displayName;
29130
- var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29324
+ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29131
29325
  AvatarPrimitive.Image,
29132
29326
  {
29133
29327
  ref,
@@ -29136,7 +29330,7 @@ var AvatarImage = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
29136
29330
  }
29137
29331
  ));
29138
29332
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
29139
- var AvatarFallback = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
29333
+ var AvatarFallback = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29140
29334
  AvatarPrimitive.Fallback,
29141
29335
  {
29142
29336
  ref,
@@ -29152,8 +29346,10 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
29152
29346
  // src/components/Navigation/Navbar/Navbar.tsx
29153
29347
  var import_link6 = __toESM(require("next/link"));
29154
29348
  var import_image3 = __toESM(require("next/image"));
29349
+ var import_navigation4 = require("next/navigation");
29155
29350
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
29156
- var import_jsx_runtime58 = require("react/jsx-runtime");
29351
+ var import_react28 = require("react");
29352
+ var import_jsx_runtime59 = require("react/jsx-runtime");
29157
29353
  function Navbar({
29158
29354
  style,
29159
29355
  badgeType,
@@ -29166,111 +29362,165 @@ function Navbar({
29166
29362
  canvasMode = "desktop",
29167
29363
  list = [],
29168
29364
  profileMenu = [],
29169
- userName = "Guest User"
29365
+ userName = "Guest User",
29366
+ isBuilder = true,
29367
+ source,
29368
+ navList
29170
29369
  }) {
29171
29370
  const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
29172
- 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: [
29173
- /* @__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" }) }),
29174
- !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)(
29175
- import_link6.default,
29371
+ const router = (0, import_navigation4.useRouter)();
29372
+ const [showExitDialog, setShowExitDialog] = (0, import_react28.useState)(false);
29373
+ const [pendingUrl, setPendingUrl] = (0, import_react28.useState)(null);
29374
+ const handleBuilderExit = (0, import_react28.useCallback)(
29375
+ (e, url) => {
29376
+ if (isBuilder) {
29377
+ e.preventDefault();
29378
+ setPendingUrl(url);
29379
+ setShowExitDialog(true);
29380
+ }
29381
+ },
29382
+ [isBuilder]
29383
+ );
29384
+ const confirmExit = () => {
29385
+ if (pendingUrl) {
29386
+ setShowExitDialog(false);
29387
+ router.push(pendingUrl);
29388
+ }
29389
+ };
29390
+ const formatedMenu = (0, import_react28.useMemo)(() => {
29391
+ if (source === "state" && navList && navList.length) {
29392
+ return navList.map((i) => ({ ...i, header: i.name || "Menu" }));
29393
+ }
29394
+ return list || [];
29395
+ }, [source, navList]);
29396
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29397
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29398
+ "nav",
29176
29399
  {
29177
- href: item.url || "#",
29178
- className: "text-sm font-medium dark:text-white text-gray-600 hover:text-gray-900 transition-colors",
29179
- children: item.header
29180
- },
29181
- item.id
29182
- )) }),
29183
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center space-x-3", children: [
29184
- !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: [
29185
- /* @__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" }),
29186
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29187
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29188
- Button,
29189
- {
29190
- variant: "ghost",
29191
- size: "icon",
29192
- className: "border border-gray-400",
29193
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Search, { className: "h-5 w-5 text-gray-400" })
29194
- }
29195
- ),
29196
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29197
- /* @__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" }) }),
29198
- 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" })
29199
- ] }),
29200
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
29201
- /* @__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: [
29202
- !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29203
- !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
29204
- /* @__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)(
29205
- AvatarImage,
29206
- {
29207
- src: "/images/appbuilder/toolset/profile.svg",
29208
- alt: "Profile"
29209
- }
29210
- ) : /* @__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) }) }),
29211
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29212
- Button,
29213
- {
29214
- variant: "ghost",
29215
- size: "icon",
29216
- className: "text-gray-900 md:hidden dark:invert",
29217
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
29218
- }
29219
- )
29220
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
29221
- Button,
29400
+ className: "w-full border-b border-b-white dark:border-b-gray-800 dark:bg-gray-800 bg-white shadow-sm",
29401
+ style,
29402
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mx-auto flex max-w-[90%] items-center justify-between px-4 py-4", children: [
29403
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29404
+ import_link6.default,
29222
29405
  {
29223
- variant: "ghost",
29224
- size: "icon",
29225
- className: "text-gray-900 dark:invert",
29226
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Menu, { className: "h-6 w-6" })
29406
+ href: "/",
29407
+ onClick: (e) => handleBuilderExit(e, "/"),
29408
+ className: "flex items-center space-x-2",
29409
+ 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" })
29227
29410
  }
29228
- )
29229
- ] }) }),
29230
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29231
- 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)) }),
29232
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "md:hidden", children: [
29233
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29234
- 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)) })
29411
+ ),
29412
+ !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)(
29413
+ import_link6.default,
29414
+ {
29415
+ href: item.url || "#",
29416
+ onClick: (e) => handleBuilderExit(e, item.url),
29417
+ className: "text-sm font-medium dark:text-white text-gray-600 hover:text-gray-900 transition-colors",
29418
+ children: item.header
29419
+ },
29420
+ item.id
29421
+ )) }),
29422
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center space-x-3", children: [
29423
+ !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: [
29424
+ /* @__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" }),
29425
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
29426
+ ] }) }) : /* @__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" }) }),
29427
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative bg-[#E9E9E9] dark:bg-gray-700 rounded-md", children: [
29428
+ /* @__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" }) }),
29429
+ 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" })
29430
+ ] }),
29431
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenu, { children: [
29432
+ /* @__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: [
29433
+ !isMobileView && showName && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h4", { className: "text-[#000000] dark:text-gray-300 text-[13px] font-[500] mb-0", children: userName }),
29434
+ !isMobileView ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
29435
+ /* @__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)(
29436
+ AvatarImage,
29437
+ {
29438
+ src: "/images/appbuilder/toolset/profile.svg",
29439
+ alt: "Profile"
29440
+ }
29441
+ ) : /* @__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) }) }),
29442
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29443
+ Button,
29444
+ {
29445
+ variant: "ghost",
29446
+ size: "icon",
29447
+ className: "text-gray-900 md:hidden dark:invert",
29448
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Menu, { className: "h-6 w-6" })
29449
+ }
29450
+ )
29451
+ ] }) : /* @__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" }) })
29452
+ ] }) }),
29453
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DropdownMenuContent, { align: "end", className: "bg-white dark:bg-gray-800", children: [
29454
+ 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)(
29455
+ import_link6.default,
29456
+ {
29457
+ href: item.url || "#",
29458
+ onClick: (e) => handleBuilderExit(e, item.url),
29459
+ children: item.header
29460
+ }
29461
+ ) }, item.id)) }),
29462
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "md:hidden", children: [
29463
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_dropdown_menu.DropdownMenuSeparator, {}),
29464
+ 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)(
29465
+ import_link6.default,
29466
+ {
29467
+ href: item.url || "#",
29468
+ onClick: (e) => handleBuilderExit(e, item.url),
29469
+ children: item.header
29470
+ }
29471
+ ) }, item.id)) })
29472
+ ] })
29473
+ ] })
29474
+ ] })
29235
29475
  ] })
29236
29476
  ] })
29477
+ }
29478
+ ),
29479
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog, { open: showExitDialog, onOpenChange: setShowExitDialog, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogContent, { className: "bg-[#fff]", children: [
29480
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogHeader, { children: [
29481
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogTitle, { children: "Exit Builder?" }),
29482
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DialogDescription, { children: "You are about to leave the builder. Any unsaved changes may be lost." })
29483
+ ] }),
29484
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(DialogFooter, { children: [
29485
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer bg-[#12715b] text-[#fff]", variant: "outline", onClick: () => setShowExitDialog(false), children: "Cancel" }),
29486
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { className: "cursor-pointer border-[#12715b] border", onClick: confirmExit, children: "Yes, Exit" })
29237
29487
  ] })
29238
- ] })
29239
- ] }) });
29488
+ ] }) })
29489
+ ] });
29240
29490
  }
29241
29491
 
29242
29492
  // src/components/Chart/BarChart.tsx
29243
- var import_react27 = __toESM(require("react"));
29493
+ var import_react29 = __toESM(require("react"));
29244
29494
  var import_recharts = require("recharts");
29245
- var import_jsx_runtime59 = require("react/jsx-runtime");
29495
+ var import_jsx_runtime60 = require("react/jsx-runtime");
29246
29496
  var ChartComponent = ({ className, style, loading, ...props }) => {
29247
29497
  const data = Array.isArray(props.data) ? props.data : [];
29248
29498
  const chartType = props.chartType || "bar";
29249
29499
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
29250
29500
  if (loading || data.length === 0) {
29251
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29501
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29252
29502
  "div",
29253
29503
  {
29254
29504
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29255
29505
  style,
29256
- 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." })
29506
+ 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." })
29257
29507
  }
29258
29508
  );
29259
29509
  }
29260
- 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: [
29261
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29262
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29263
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
29264
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29265
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29266
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29510
+ 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: [
29511
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29512
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29513
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29514
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29515
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Legend, { verticalAlign: legendsPosition, align: "center" }),
29516
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29267
29517
  import_recharts.Bar,
29268
29518
  {
29269
29519
  dataKey: "value",
29270
29520
  fill: "#00695C",
29271
29521
  radius: [6, 6, 0, 0],
29272
29522
  isAnimationActive: false,
29273
- children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29523
+ children: data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29274
29524
  "rect",
29275
29525
  {
29276
29526
  fill: entry.color || "#00695C"
@@ -29279,16 +29529,16 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
29279
29529
  ))
29280
29530
  }
29281
29531
  )
29282
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_recharts.AreaChart, { data, children: [
29283
- /* @__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: [
29284
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29285
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29532
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts.AreaChart, { data, children: [
29533
+ /* @__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: [
29534
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
29535
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
29286
29536
  ] }) }),
29287
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29288
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29289
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.YAxis, {}),
29290
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29291
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
29537
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3" }),
29538
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.XAxis, { dataKey: "name" }),
29539
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.YAxis, {}),
29540
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts.Tooltip, { formatter: (value) => `${value}k` }),
29541
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29292
29542
  import_recharts.Area,
29293
29543
  {
29294
29544
  type: "monotone",
@@ -29301,12 +29551,12 @@ var ChartComponent = ({ className, style, loading, ...props }) => {
29301
29551
  )
29302
29552
  ] }) }) });
29303
29553
  };
29304
- var BarChart_default = import_react27.default.memo(ChartComponent);
29554
+ var BarChart_default = import_react29.default.memo(ChartComponent);
29305
29555
 
29306
29556
  // src/components/Chart/PieChart.tsx
29307
- var import_react28 = __toESM(require("react"));
29557
+ var import_react30 = __toESM(require("react"));
29308
29558
  var import_recharts2 = require("recharts");
29309
- var import_jsx_runtime60 = require("react/jsx-runtime");
29559
+ var import_jsx_runtime61 = require("react/jsx-runtime");
29310
29560
  var getRandomColor = () => {
29311
29561
  const palette = [
29312
29562
  "#2563eb",
@@ -29326,51 +29576,57 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29326
29576
  const showLegends = props.showLegends ?? true;
29327
29577
  const labelType = props.labelType || "inside";
29328
29578
  const canvasMode = props.canvasMode;
29329
- const data = (0, import_react28.useMemo)(() => {
29579
+ const data = (0, import_react30.useMemo)(() => {
29330
29580
  if (!Array.isArray(props.data)) return [];
29331
29581
  return props.data.map((item) => ({ ...item, color: getRandomColor() }));
29332
29582
  }, [props.data]);
29333
- const total = (0, import_react28.useMemo)(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
29583
+ const total = (0, import_react30.useMemo)(() => data.reduce((sum, d) => sum + d.value, 0), [data]);
29334
29584
  const forceMobile = canvasMode === "mobile" || canvasMode === "tablet";
29335
- const renderLegends = (0, import_react28.useMemo)(() => {
29585
+ const [mounted, setMounted] = (0, import_react30.useState)(false);
29586
+ (0, import_react30.useEffect)(() => {
29587
+ const timeout = setTimeout(() => setMounted(true), 100);
29588
+ return () => clearTimeout(timeout);
29589
+ }, []);
29590
+ const renderLegends = (0, import_react30.useMemo)(() => {
29336
29591
  if (!showLegends) return null;
29337
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29592
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: data.map((d) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29338
29593
  "div",
29339
29594
  {
29340
29595
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
29341
29596
  children: [
29342
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29597
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29343
29598
  "span",
29344
29599
  {
29345
29600
  className: "inline-block w-[16px] h-[16px] rounded",
29346
29601
  style: { backgroundColor: d.color }
29347
29602
  }
29348
29603
  ),
29349
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29604
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
29350
29605
  ]
29351
29606
  },
29352
29607
  d.name
29353
29608
  )) });
29354
29609
  }, [data, showLegends]);
29610
+ if (!mounted) return null;
29355
29611
  if (loading || data.length === 0) {
29356
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29612
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29357
29613
  "div",
29358
29614
  {
29359
29615
  className: `flex items-center justify-center w-full h-[300px] md:h-[400px] bg-gray-50 animate-pulse rounded-lg ${className}`,
29360
29616
  style,
29361
- 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." })
29617
+ 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." })
29362
29618
  }
29363
29619
  );
29364
29620
  }
29365
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29621
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29366
29622
  "div",
29367
29623
  {
29368
29624
  className: `relative flex flex-col items-center ${className}`,
29369
29625
  style,
29370
29626
  children: [
29371
- /* @__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: [
29372
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_recharts2.PieChart, { children: [
29373
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29627
+ /* @__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: [
29628
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.ResponsiveContainer, { width: "99%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_recharts2.PieChart, { children: [
29629
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29374
29630
  import_recharts2.Pie,
29375
29631
  {
29376
29632
  data,
@@ -29382,8 +29638,8 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29382
29638
  labelLine: false,
29383
29639
  isAnimationActive: false,
29384
29640
  children: [
29385
- data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29386
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29641
+ data.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_recharts2.Cell, { fill: entry.color }, `cell-${index}`)),
29642
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29387
29643
  import_recharts2.LabelList,
29388
29644
  {
29389
29645
  dataKey: "value",
@@ -29396,14 +29652,14 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29396
29652
  ]
29397
29653
  }
29398
29654
  ),
29399
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
29655
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29400
29656
  import_recharts2.Tooltip,
29401
29657
  {
29402
29658
  formatter: (value, name) => [`${value}k`, name]
29403
29659
  }
29404
29660
  )
29405
29661
  ] }) }),
29406
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
29662
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
29407
29663
  "div",
29408
29664
  {
29409
29665
  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]`,
@@ -29414,18 +29670,18 @@ var DonutChart = ({ className, style, loading, ...props }) => {
29414
29670
  }
29415
29671
  )
29416
29672
  ] }),
29417
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29673
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-wrap justify-center gap-2 mt-6 w-full md:w-auto", children: renderLegends })
29418
29674
  ]
29419
29675
  }
29420
29676
  );
29421
29677
  };
29422
- var PieChart_default = import_react28.default.memo(DonutChart);
29678
+ var PieChart_default = import_react30.default.memo(DonutChart);
29423
29679
 
29424
29680
  // src/components/Blocks/EmailComposer.tsx
29425
- var import_jsx_runtime61 = require("react/jsx-runtime");
29681
+ var import_jsx_runtime62 = require("react/jsx-runtime");
29426
29682
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
29427
- 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: [
29428
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29683
+ 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: [
29684
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29429
29685
  "input",
29430
29686
  {
29431
29687
  type: "email",
@@ -29434,8 +29690,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29434
29690
  required: true
29435
29691
  }
29436
29692
  ) }),
29437
- /* @__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: [
29438
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29693
+ /* @__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: [
29694
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29439
29695
  "input",
29440
29696
  {
29441
29697
  type: "email",
@@ -29446,7 +29702,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29446
29702
  required: true
29447
29703
  }
29448
29704
  ),
29449
- !showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29705
+ !showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29450
29706
  "button",
29451
29707
  {
29452
29708
  onClick: () => setShowCc?.(true),
@@ -29454,7 +29710,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29454
29710
  children: "Cc"
29455
29711
  }
29456
29712
  ),
29457
- !showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29713
+ !showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29458
29714
  "button",
29459
29715
  {
29460
29716
  onClick: () => setShowBcc?.(true),
@@ -29463,7 +29719,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29463
29719
  }
29464
29720
  )
29465
29721
  ] }) }),
29466
- showCc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29722
+ showCc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29467
29723
  "input",
29468
29724
  {
29469
29725
  type: "text",
@@ -29473,7 +29729,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29473
29729
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29474
29730
  }
29475
29731
  ) }),
29476
- showBcc && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29732
+ showBcc && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29477
29733
  "input",
29478
29734
  {
29479
29735
  type: "text",
@@ -29483,7 +29739,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29483
29739
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29484
29740
  }
29485
29741
  ) }),
29486
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
29742
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29487
29743
  "input",
29488
29744
  {
29489
29745
  type: "text",
@@ -29493,11 +29749,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
29493
29749
  className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
29494
29750
  }
29495
29751
  ) }),
29496
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29497
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex justify-end gap-2", children: [
29498
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29499
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29500
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29752
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MyEditor, { value: body, onChange: setBody }) }),
29753
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex justify-end gap-2", children: [
29754
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
29755
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
29756
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
29501
29757
  ] })
29502
29758
  ] }) });
29503
29759
  }
@@ -29542,10 +29798,10 @@ function showSonnerToast({
29542
29798
  // src/components/ui/sonner.tsx
29543
29799
  var import_next_themes = require("next-themes");
29544
29800
  var import_sonner2 = require("sonner");
29545
- var import_jsx_runtime62 = require("react/jsx-runtime");
29801
+ var import_jsx_runtime63 = require("react/jsx-runtime");
29546
29802
  var Toaster = ({ ...props }) => {
29547
29803
  const { theme = "system" } = (0, import_next_themes.useTheme)();
29548
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
29804
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
29549
29805
  import_sonner2.Toaster,
29550
29806
  {
29551
29807
  theme,