@livechat/platform-workflows 0.0.81 → 0.0.83

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.mjs CHANGED
@@ -2300,19 +2300,23 @@ function Waitlist({ image }) {
2300
2300
  var Waitlist_default = Waitlist;
2301
2301
 
2302
2302
  // src/views/Workflows/index.tsx
2303
- import { useEffect as useEffect18 } from "react";
2304
- import { Navigate as Navigate2, Route as Route6, Routes as Routes6, useNavigate as useNavigate20 } from "react-router-dom";
2303
+ import { useEffect as useEffect19 } from "react";
2304
+ import { Navigate as Navigate2, Route as Route6, Routes as Routes6, useNavigate as useNavigate21 } from "react-router-dom";
2305
2305
  import { Loader as Loader6 } from "@livechat/developer-studio-ui-react";
2306
2306
 
2307
2307
  // src/views/Workflows/Creator/index.tsx
2308
2308
  import {
2309
2309
  Route as Route3,
2310
2310
  Routes as Routes3,
2311
- useLocation as useLocation6,
2311
+ useLocation as useLocation5,
2312
2312
  useNavigate as useNavigate13,
2313
2313
  useParams as useParams4
2314
2314
  } from "react-router-dom";
2315
- import { Loader as Loader3 } from "@livechat/developer-studio-ui-react";
2315
+ import {
2316
+ Loader as Loader3,
2317
+ useFetchOrganizationProducts as useFetchOrganizationProducts2
2318
+ } from "@livechat/developer-studio-ui-react";
2319
+ import { useFetchIntegrationCredentialsQuery as useFetchIntegrationCredentialsQuery2 } from "@livechat/platform-integrations";
2316
2320
 
2317
2321
  // src/constants/products.ts
2318
2322
  var OTHER_TYPES = {
@@ -12000,7 +12004,7 @@ function OneMessagesProvider({ children }) {
12000
12004
  const generateAiResponseMutation = useGenerateAIResponse();
12001
12005
  const { user } = useUserContext2();
12002
12006
  const isLoading = generateAiResponseMutation.isLoading;
12003
- const sendMessage = (message) => __async(this, null, function* () {
12007
+ const sendMessage2 = (message) => __async(this, null, function* () {
12004
12008
  setIsError(null);
12005
12009
  setEvents((prevEvents) => [
12006
12010
  ...prevEvents,
@@ -12062,7 +12066,7 @@ function OneMessagesProvider({ children }) {
12062
12066
  isError,
12063
12067
  groupedEvents: eventsGroup,
12064
12068
  hasAdditionalEvents,
12065
- sendMessage
12069
+ sendMessage: sendMessage2
12066
12070
  },
12067
12071
  children
12068
12072
  }
@@ -12540,7 +12544,7 @@ var validateTasks = (workflow, frames, products) => {
12540
12544
  const resolvingErrors = jsonUtils.getMatchesInObject(task2).map((match2) => {
12541
12545
  const segments = match2.rawValue.split(".");
12542
12546
  const resolved = jsonUtils.resolveTextByContext(match2.value, frame);
12543
- let message = `Invalid field value`;
12547
+ let message = "Invalid field value";
12544
12548
  const params = {};
12545
12549
  if (!(frame == null ? void 0 : frame[segments[0]])) {
12546
12550
  if (segments[0]) {
@@ -12560,7 +12564,7 @@ var validateTasks = (workflow, frames, products) => {
12560
12564
  message += " - trigger not found";
12561
12565
  }
12562
12566
  } else if (!workflow.trigger.type || workflow.trigger.type === "recurring" || workflow.trigger.type === "webhook") {
12563
- message = `Couldn't use manual parameters when trigger is not manual`;
12567
+ message = "Couldn't use manual parameters when trigger is not manual";
12564
12568
  } else {
12565
12569
  message += " - invalid input property";
12566
12570
  }
@@ -12645,7 +12649,7 @@ var validateTasks = (workflow, frames, products) => {
12645
12649
  initial
12646
12650
  );
12647
12651
  }
12648
- return taskReducer(workflow.definition.tasks, [], `/definition/tasks`);
12652
+ return taskReducer(workflow.definition.tasks, [], "/definition/tasks");
12649
12653
  };
12650
12654
  var validateTrigger = (workflow, frames, products) => {
12651
12655
  var _a;
@@ -12658,7 +12662,7 @@ var validateTrigger = (workflow, frames, products) => {
12658
12662
  frames.trigger
12659
12663
  );
12660
12664
  if (!resolved) {
12661
- let message = `Invalid field value`;
12665
+ let message = "Invalid field value";
12662
12666
  const params = {};
12663
12667
  if (segments[0] === "workflow") {
12664
12668
  if (segments[1] === "credentials") {
@@ -12692,14 +12696,14 @@ var validateTrigger = (workflow, frames, products) => {
12692
12696
  }).filter(Boolean);
12693
12697
  const connectionErrors = resolvingErrors.filter((error) => error.params.subType === "credentials").map((error) => {
12694
12698
  return {
12695
- instancePath: `/trigger`,
12699
+ instancePath: "/trigger",
12696
12700
  keyword: "connection",
12697
12701
  message: `Not connected to ${error.params.provider}`,
12698
12702
  params: {}
12699
12703
  };
12700
12704
  });
12701
12705
  const activationError = config2 && config2.customization.provider.startsWith(IntegrationNames12.Text) && !products.find(({ product }) => product === config2.customization.product) ? {
12702
- instancePath: `/trigger`,
12706
+ instancePath: "/trigger",
12703
12707
  keyword: "activation",
12704
12708
  message: `${config2.customization.product} not activated`,
12705
12709
  params: {}
@@ -12853,8 +12857,8 @@ var getWorkflowValidation = (workflow, internal, external) => {
12853
12857
  if ("missingProperty" in rawError.params) {
12854
12858
  if (rawError.params.missingProperty) {
12855
12859
  rawError.instancePath = `${rawError.instancePath}/${rawError.params.missingProperty}`;
12856
- rawError.message = `property is required`;
12857
- rawError.keyword = `requiredProperty`;
12860
+ rawError.message = "property is required";
12861
+ rawError.keyword = "requiredProperty";
12858
12862
  }
12859
12863
  }
12860
12864
  switch (rawError.keyword) {
@@ -12865,7 +12869,7 @@ var getWorkflowValidation = (workflow, internal, external) => {
12865
12869
  workflow
12866
12870
  )) == null ? void 0 : _a[0] : void 0;
12867
12871
  if (value === null) {
12868
- message = `This field cannot be empty`;
12872
+ message = "This field cannot be empty";
12869
12873
  } else {
12870
12874
  message = "Invalid value type";
12871
12875
  }
@@ -12874,7 +12878,7 @@ var getWorkflowValidation = (workflow, internal, external) => {
12874
12878
  message = `Field '${rawError.params.missingProperty}' is required`;
12875
12879
  break;
12876
12880
  case "requiredProperty":
12877
- message = `This field cannot be empty`;
12881
+ message = "This field cannot be empty";
12878
12882
  break;
12879
12883
  case "minLength":
12880
12884
  message = `Must have more than ${rawError.params.limit} characters`;
@@ -13350,30 +13354,33 @@ function WorkflowCreatorProviderBase({
13350
13354
  return;
13351
13355
  }
13352
13356
  setAction("isSaving", true);
13353
- if (state2.workflow.id) {
13354
- const updateMutationResult = yield updateWorkflowAction.mutateAsync(
13355
- state2.workflow
13356
- );
13357
- if (!silent) {
13358
- notifications.addSuccessToast(
13359
- "Workflow has been updated successfully"
13357
+ try {
13358
+ if (state2.workflow.id) {
13359
+ const updateMutationResult = yield updateWorkflowAction.mutateAsync(
13360
+ state2.workflow
13360
13361
  );
13361
- }
13362
- setWorkflow((prevState) => __spreadProps(__spreadValues({}, prevState), {
13363
- version: updateMutationResult.version
13364
- }));
13365
- } else {
13366
- const workflowId = yield createWorkflowAction.mutateAsync(
13367
- state2.workflow
13368
- );
13369
- if (!silent) {
13370
- notifications.addSuccessToast(
13371
- "Workflow has been created successfully"
13362
+ if (!silent) {
13363
+ notifications.addSuccessToast(
13364
+ "Workflow has been updated successfully"
13365
+ );
13366
+ }
13367
+ setWorkflow((prevState) => __spreadProps(__spreadValues({}, prevState), {
13368
+ version: updateMutationResult.version
13369
+ }));
13370
+ } else {
13371
+ const workflowId = yield createWorkflowAction.mutateAsync(
13372
+ state2.workflow
13372
13373
  );
13374
+ if (!silent) {
13375
+ notifications.addSuccessToast(
13376
+ "Workflow has been created successfully"
13377
+ );
13378
+ }
13379
+ navigate(`/workflow/${workflowId}`);
13373
13380
  }
13374
- navigate(`/workflow/${workflowId}`);
13381
+ } finally {
13382
+ setAction("isSaving", false);
13375
13383
  }
13376
- setAction("isSaving", false);
13377
13384
  }),
13378
13385
  [
13379
13386
  createWorkflowAction,
@@ -13394,33 +13401,39 @@ function WorkflowCreatorProviderBase({
13394
13401
  return;
13395
13402
  }
13396
13403
  setAction("isActivating", true);
13397
- yield activateWorkflowAction.mutateAsync({
13398
- id: state2.workflow.id,
13399
- active: !state2.workflow.active
13400
- });
13401
- setWorkflow((prevState) => __spreadProps(__spreadValues({}, prevState), {
13402
- active: !prevState.active
13403
- }));
13404
- notifications.addSuccessToast(
13405
- `Workflow has been ${state2.workflow.active ? "deactivated" : "activated"}`
13406
- );
13407
- setAction("isActivating", false);
13404
+ try {
13405
+ yield activateWorkflowAction.mutateAsync({
13406
+ id: state2.workflow.id,
13407
+ active: !state2.workflow.active
13408
+ });
13409
+ setWorkflow((prevState) => __spreadProps(__spreadValues({}, prevState), {
13410
+ active: !prevState.active
13411
+ }));
13412
+ notifications.addSuccessToast(
13413
+ `Workflow has been ${state2.workflow.active ? "deactivated" : "activated"}`
13414
+ );
13415
+ } finally {
13416
+ setAction("isActivating", false);
13417
+ }
13408
13418
  }), [activateWorkflowAction, notifications, validate, setWorkflow, setAction]);
13409
13419
  const remove = useCallback2(() => __async(this, null, function* () {
13410
13420
  const state2 = autosaveStateRef.current;
13411
13421
  setAction("isRemoving", true);
13412
- if (state2.workflow.draft) {
13413
- if (state2.workflow.related_workflow_id) {
13414
- yield deleteWorkflowAction.mutateAsync({
13415
- id: state2.workflow.related_workflow_id
13416
- });
13422
+ try {
13423
+ if (state2.workflow.draft) {
13424
+ if (state2.workflow.related_workflow_id) {
13425
+ yield deleteWorkflowAction.mutateAsync({
13426
+ id: state2.workflow.related_workflow_id
13427
+ });
13428
+ }
13429
+ } else {
13430
+ yield deleteWorkflowAction.mutateAsync(state2.workflow);
13417
13431
  }
13418
- } else {
13419
- yield deleteWorkflowAction.mutateAsync(state2.workflow);
13432
+ navigate("/workflow/list");
13433
+ notifications.addSuccessToast("Workflow has been removed successfully");
13434
+ } finally {
13435
+ setAction("isRemoving", false);
13420
13436
  }
13421
- navigate("/workflow/list");
13422
- notifications.addSuccessToast("Workflow has been removed successfully");
13423
- setAction("isRemoving", false);
13424
13437
  }), [setAction, navigate, notifications, deleteWorkflowAction]);
13425
13438
  const createDraft = useCallback2(
13426
13439
  (options2) => __async(this, null, function* () {
@@ -13435,19 +13448,22 @@ function WorkflowCreatorProviderBase({
13435
13448
  }
13436
13449
  }
13437
13450
  setAction("isCreating", true);
13438
- if (state2.workflow.related_workflow_id) {
13439
- yield deleteWorkflowAction.mutateAsync({
13440
- id: state2.workflow.related_workflow_id
13441
- });
13451
+ try {
13452
+ if (state2.workflow.related_workflow_id) {
13453
+ yield deleteWorkflowAction.mutateAsync({
13454
+ id: state2.workflow.related_workflow_id
13455
+ });
13456
+ }
13457
+ const draftId = yield createWorkflowDraftAction.mutateAsync(
13458
+ state2.workflow
13459
+ );
13460
+ navigate(`/workflow/${draftId}`);
13461
+ notifications.addSuccessToast(
13462
+ "Workflow draft has been created successfully"
13463
+ );
13464
+ } finally {
13465
+ setAction("isCreating", false);
13442
13466
  }
13443
- const draftId = yield createWorkflowDraftAction.mutateAsync(
13444
- state2.workflow
13445
- );
13446
- navigate(`/workflow/${draftId}`);
13447
- notifications.addSuccessToast(
13448
- "Workflow draft has been created successfully"
13449
- );
13450
- setAction("isCreating", false);
13451
13467
  }),
13452
13468
  [
13453
13469
  createWorkflowDraftAction,
@@ -13474,19 +13490,24 @@ function WorkflowCreatorProviderBase({
13474
13490
  return;
13475
13491
  }
13476
13492
  setAction("isPublishing", true);
13477
- if (state2.workflow.id) {
13478
- const { id } = yield publishWorkflowAction.mutateAsync(state2.workflow);
13479
- navigate(`/workflow/${id}`);
13480
- } else {
13481
- const id = yield createWorkflowAction.mutateAsync(__spreadProps(__spreadValues({}, state2.workflow), {
13482
- draft: false
13483
- }));
13484
- navigate(`/workflow/${id}`);
13493
+ try {
13494
+ if (state2.workflow.id) {
13495
+ const { id } = yield publishWorkflowAction.mutateAsync(
13496
+ state2.workflow
13497
+ );
13498
+ navigate(`/workflow/${id}`);
13499
+ } else {
13500
+ const id = yield createWorkflowAction.mutateAsync(__spreadProps(__spreadValues({}, state2.workflow), {
13501
+ draft: false
13502
+ }));
13503
+ navigate(`/workflow/${id}`);
13504
+ }
13505
+ notifications.addSuccessToast(
13506
+ "Workflow draft has been published successfully"
13507
+ );
13508
+ } finally {
13509
+ setAction("isPublishing", false);
13485
13510
  }
13486
- notifications.addSuccessToast(
13487
- "Workflow draft has been published successfully"
13488
- );
13489
- setAction("isPublishing", false);
13490
13511
  }),
13491
13512
  [
13492
13513
  validate,
@@ -13500,26 +13521,29 @@ function WorkflowCreatorProviderBase({
13500
13521
  const discardDraft = useCallback2(() => __async(this, null, function* () {
13501
13522
  const state2 = autosaveStateRef.current;
13502
13523
  setAction("isDiscarding", true);
13503
- if (state2.workflow.draft) {
13504
- if (state2.workflow.id) {
13505
- yield deleteWorkflowAction.mutateAsync(state2.workflow);
13506
- }
13507
- if (state2.workflow.related_workflow_id) {
13508
- navigate(`/workflow/${state2.workflow.related_workflow_id}`);
13509
- } else {
13510
- navigate(`/workflow/list`);
13524
+ try {
13525
+ if (state2.workflow.draft) {
13526
+ if (state2.workflow.id) {
13527
+ yield deleteWorkflowAction.mutateAsync(state2.workflow);
13528
+ }
13529
+ if (state2.workflow.related_workflow_id) {
13530
+ navigate(`/workflow/${state2.workflow.related_workflow_id}`);
13531
+ } else {
13532
+ navigate("/workflow/list");
13533
+ }
13534
+ } else if (state2.workflow.related_workflow_id) {
13535
+ yield deleteWorkflowAction.mutateAsync({
13536
+ id: state2.workflow.related_workflow_id,
13537
+ related_workflow_id: state2.workflow.id
13538
+ });
13539
+ navigate(`/workflow/${state2.workflow.id}`);
13511
13540
  }
13512
- } else if (state2.workflow.related_workflow_id) {
13513
- yield deleteWorkflowAction.mutateAsync({
13514
- id: state2.workflow.related_workflow_id,
13515
- related_workflow_id: state2.workflow.id
13516
- });
13517
- navigate(`/workflow/${state2.workflow.id}`);
13541
+ notifications.addSuccessToast(
13542
+ "Workflow draft has been discarded successfully"
13543
+ );
13544
+ } finally {
13545
+ setAction("isDiscarding", false);
13518
13546
  }
13519
- notifications.addSuccessToast(
13520
- "Workflow draft has been discarded successfully"
13521
- );
13522
- setAction("isDiscarding", false);
13523
13547
  }), [deleteWorkflowAction, notifications, navigate, setAction]);
13524
13548
  const [previewModalVisible, setPreviewModalVisible] = useState4({ isVisible: false });
13525
13549
  return /* @__PURE__ */ jsx4(
@@ -16359,7 +16383,7 @@ function CustomTagsField({
16359
16383
  error,
16360
16384
  trim: trim2,
16361
16385
  disabled,
16362
- wrapperCss: wrapperCss2,
16386
+ wrapperCss: wrapperCss3,
16363
16387
  onChange
16364
16388
  }) {
16365
16389
  const wrapperRef = useRef5(null);
@@ -16367,7 +16391,7 @@ function CustomTagsField({
16367
16391
  useOnClickOutside(wrapperRef, () => {
16368
16392
  setIsPickerVisible(false);
16369
16393
  });
16370
- return /* @__PURE__ */ jsx4("div", { css: wrapperCss2, ref: wrapperRef, children: /* @__PURE__ */ jsx4(
16394
+ return /* @__PURE__ */ jsx4("div", { css: wrapperCss3, ref: wrapperRef, children: /* @__PURE__ */ jsx4(
16371
16395
  CustomTagsInput,
16372
16396
  {
16373
16397
  context,
@@ -18919,16 +18943,16 @@ import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexica
18919
18943
  import { CLEAR_EDITOR_COMMAND } from "lexical";
18920
18944
  var useSendOneMessage = () => {
18921
18945
  const [editor] = useLexicalComposerContext2();
18922
- const { sendMessage } = useContext8(OneMessagesContext);
18946
+ const { sendMessage: sendMessage2 } = useContext8(OneMessagesContext);
18923
18947
  const onSend = useCallback8(() => {
18924
18948
  var _a;
18925
18949
  const messageToSend = (_a = editor.getRootElement()) == null ? void 0 : _a.innerText.trim();
18926
18950
  if (!messageToSend) {
18927
18951
  return;
18928
18952
  }
18929
- sendMessage(messageToSend);
18953
+ sendMessage2(messageToSend);
18930
18954
  editor.dispatchCommand(CLEAR_EDITOR_COMMAND, void 0);
18931
- }, [editor, sendMessage]);
18955
+ }, [editor, sendMessage2]);
18932
18956
  return onSend;
18933
18957
  };
18934
18958
 
@@ -21411,13 +21435,20 @@ function PublishWorkflowModal({
21411
21435
  }
21412
21436
 
21413
21437
  // src/views/Workflows/Creator/View.tsx
21438
+ import { useEffect as useEffect18 } from "react";
21414
21439
  import { Route as Route2, Routes as Routes2 } from "react-router-dom";
21440
+ import { useReactFlow as useReactFlow3 } from "reactflow";
21415
21441
  import {
21416
21442
  DesignToken as DesignToken37,
21417
21443
  RadiusToken as RadiusToken18,
21418
21444
  SpacingToken as SpacingToken34
21419
21445
  } from "@livechat/design-system-react-components";
21420
21446
 
21447
+ // src/utils/sendMessage.ts
21448
+ var sendMessage = (type) => {
21449
+ window.parent.postMessage({ type }, "*");
21450
+ };
21451
+
21421
21452
  // src/views/Workflows/Creator/Panels/Details/index.tsx
21422
21453
  import { Navigate, Route, Routes } from "react-router-dom";
21423
21454
 
@@ -21657,7 +21688,7 @@ function WorkflowDetailsPanel({
21657
21688
  {
21658
21689
  isSelected: tab === "info",
21659
21690
  onClick: () => {
21660
- navigate(`../info`, { replace: true, relative: "route" });
21691
+ navigate("../info", { replace: true, relative: "route" });
21661
21692
  },
21662
21693
  children: "Info"
21663
21694
  }
@@ -21667,7 +21698,7 @@ function WorkflowDetailsPanel({
21667
21698
  {
21668
21699
  isSelected: tab === "executions",
21669
21700
  onClick: () => {
21670
- navigate(`../executions`, { replace: true, relative: "route" });
21701
+ navigate("../executions", { replace: true, relative: "route" });
21671
21702
  },
21672
21703
  children: "History"
21673
21704
  }
@@ -22049,7 +22080,7 @@ var Panel_default3 = WorkflowElementPanel;
22049
22080
  // src/views/Workflows/Creator/Navbar.tsx
22050
22081
  import { useEffect as useEffect17, useRef as useRef9, useState as useState27 } from "react";
22051
22082
  import { useNavigate as useNavigate12 } from "react-router-dom";
22052
- import { ArrowBarLeft, ChevronDown as ChevronDown3 } from "@livechat/design-system-icons";
22083
+ import { ChevronDown as ChevronDown3, Close as Close6 } from "@livechat/design-system-icons";
22053
22084
  import {
22054
22085
  ActionMenu as ActionMenu2,
22055
22086
  Button as Button28,
@@ -22144,42 +22175,25 @@ function WorkflowCreatorNavbar() {
22144
22175
  borderBottom: true,
22145
22176
  center: true,
22146
22177
  css: css`
22147
- min-height: 70px;
22178
+ min-height: var(${SpacingToken33.Spacing14});
22179
+ padding-left: var(${SpacingToken33.Spacing4});
22148
22180
  `,
22149
22181
  flexEnd: true,
22150
22182
  lowMargin: true,
22151
- lowPadding: true,
22152
22183
  noMaxWidth: true,
22153
22184
  noWrap: true,
22154
22185
  notPadded: true,
22155
- paddingLeft: true,
22156
22186
  spaceBetween: true,
22157
22187
  children: [
22158
- getWorkflowsEnv("isHeadless") && /* @__PURE__ */ jsx4(
22188
+ getWorkflowsEnv("isLiveChatMode") && /* @__PURE__ */ jsx4(
22159
22189
  Button28,
22160
22190
  {
22161
- css: css`
22162
- font-size: var(${SpacingToken33.Spacing4});
22163
- text-decoration: none;
22164
- `,
22165
- kind: "text",
22191
+ icon: /* @__PURE__ */ jsx4(Icon31, { source: Close6 }),
22192
+ kind: "plain",
22166
22193
  onClick: () => {
22167
22194
  navigate("/workflow/list");
22168
- },
22169
- children: /* @__PURE__ */ jsxs2(Row16, { center: true, noWrap: true, notPadded: true, children: [
22170
- /* @__PURE__ */ jsx4(
22171
- Icon31,
22172
- {
22173
- css: css`
22174
- min-height: var(${SpacingToken33.Spacing8});
22175
- min-width: var(${SpacingToken33.Spacing8});
22176
- `,
22177
- size: "large",
22178
- source: ArrowBarLeft
22179
- }
22180
- ),
22181
- "Workflows"
22182
- ] })
22195
+ sendMessage("openSideNav" /* OpenSideNav */);
22196
+ }
22183
22197
  }
22184
22198
  ),
22185
22199
  /* @__PURE__ */ jsxs2(Row16, { center: true, noMaxWidth: true, setRowPadding: "4px 16px", spaceBetween: true, children: [
@@ -22365,6 +22379,22 @@ function WorkflowCreatorView() {
22365
22379
  state: { selection },
22366
22380
  focus
22367
22381
  } = useWorkflowCreator();
22382
+ const { fitView } = useReactFlow3();
22383
+ useEffect18(() => {
22384
+ if (getWorkflowsEnv("isLiveChatMode")) {
22385
+ sendMessage("closeSideNav" /* CloseSideNav */);
22386
+ const timeoutId = setTimeout(() => {
22387
+ fitView({
22388
+ duration: 400,
22389
+ maxZoom: 1.15,
22390
+ minZoom: 1.15
22391
+ });
22392
+ }, 200);
22393
+ return () => {
22394
+ clearTimeout(timeoutId);
22395
+ };
22396
+ }
22397
+ }, [fitView]);
22368
22398
  return /* @__PURE__ */ jsxs2(View2, { children: [
22369
22399
  /* @__PURE__ */ jsx4(Navbar_default, {}),
22370
22400
  /* @__PURE__ */ jsxs2(WorkflowCreatorContent, { grayBackground: getWorkflowsEnv("isHeadless"), children: [
@@ -22394,15 +22424,18 @@ var View_default = WorkflowCreatorView;
22394
22424
  // src/views/Workflows/Creator/index.tsx
22395
22425
  function WorkflowCreator() {
22396
22426
  var _a, _b, _c;
22397
- const location = useLocation6();
22427
+ const location = useLocation5();
22398
22428
  const { id } = useParams4();
22399
22429
  const navigate = useNavigate13();
22400
22430
  const workflowQuery = useFetchWorkflow(id === "new" ? void 0 : id);
22431
+ const credentialsQuery = useFetchIntegrationCredentialsQuery2();
22432
+ const organizationProducts = useFetchOrganizationProducts2();
22401
22433
  useFetchWorkflow((_a = workflowQuery.data) == null ? void 0 : _a.related_workflow_id);
22402
22434
  if (!id) {
22403
22435
  return;
22404
22436
  }
22405
- if (id !== "new" && workflowQuery.isLoading) {
22437
+ const isLoading = workflowQuery.isLoading || credentialsQuery.isInitialLoading || organizationProducts.isInitialLoading;
22438
+ if (id !== "new" && isLoading) {
22406
22439
  return /* @__PURE__ */ jsx4(Loader3, { stretch: true });
22407
22440
  }
22408
22441
  if (id !== "new" && !workflowQuery.isSuccess) {
@@ -22869,6 +22902,7 @@ function WorkflowTemplatesCategoryFilter({
22869
22902
  handleStatus,
22870
22903
  status
22871
22904
  }) {
22905
+ var _a;
22872
22906
  const [isVisible, setIsVisible] = useState28(false);
22873
22907
  const getItem = useCallback15(
22874
22908
  (key, category, icon2) => ({
@@ -22884,25 +22918,26 @@ function WorkflowTemplatesCategoryFilter({
22884
22918
  }),
22885
22919
  [handleStatus]
22886
22920
  );
22921
+ const options = [
22922
+ getItem("0", "All"),
22923
+ getItem("1", WorkflowTemplateCategory3.NotificationAndAlerts, Notifications2),
22924
+ getItem("2", WorkflowTemplateCategory3.SalesManagement, CurrencyDollar2),
22925
+ getItem("3", WorkflowTemplateCategory3.LeadCollection, TargetArrow2),
22926
+ getItem("4", WorkflowTemplateCategory3.ChatManagement, ChatDots2),
22927
+ getItem("5", WorkflowTemplateCategory3.CustomerExperience, Smiles2)
22928
+ ];
22929
+ const selectedKey = (_a = options.find(
22930
+ (option) => option.element.props.children[1] === status
22931
+ )) == null ? void 0 : _a.key;
22887
22932
  return /* @__PURE__ */ jsx4(
22888
22933
  ActionMenu3,
22889
22934
  {
22890
22935
  onClose: () => {
22891
22936
  setIsVisible(false);
22892
22937
  },
22893
- options: [
22894
- getItem("0", "All"),
22895
- getItem(
22896
- "1",
22897
- WorkflowTemplateCategory3.NotificationAndAlerts,
22898
- Notifications2
22899
- ),
22900
- getItem("2", WorkflowTemplateCategory3.SalesManagement, CurrencyDollar2),
22901
- getItem("3", WorkflowTemplateCategory3.LeadCollection, TargetArrow2),
22902
- getItem("4", WorkflowTemplateCategory3.ChatManagement, ChatDots2),
22903
- getItem("5", WorkflowTemplateCategory3.CustomerExperience, Smiles2)
22904
- ],
22938
+ options,
22905
22939
  placement: "bottom",
22940
+ selectedOptions: selectedKey ? [selectedKey] : [],
22906
22941
  triggerRenderer: /* @__PURE__ */ jsxs2(
22907
22942
  Button30,
22908
22943
  {
@@ -22945,6 +22980,7 @@ function WorkflowTemplatesProductFilter({
22945
22980
  handleStatus,
22946
22981
  status
22947
22982
  }) {
22983
+ var _a;
22948
22984
  const [isVisible, setIsVisible] = useState29(false);
22949
22985
  const getItem = useCallback16(
22950
22986
  (key, product, icon2) => ({
@@ -22960,23 +22996,28 @@ function WorkflowTemplatesProductFilter({
22960
22996
  }),
22961
22997
  [handleStatus]
22962
22998
  );
22999
+ const options = [
23000
+ getItem("0", "All"),
23001
+ getItem("1", IntegrationDisplayNames11.LiveChat, LiveChatColored),
23002
+ getItem("2", IntegrationDisplayNames11.HelpDesk, HelpDeskColored),
23003
+ getItem("3", IntegrationDisplayNames11.OpenAI, Chatgpt),
23004
+ getItem("4", IntegrationDisplayNames11.Shopify, ShopifyColored),
23005
+ getItem("5", IntegrationDisplayNames11.Mailchimp, Mailchimp)
23006
+ // getItem('6', IntegrationDisplayNames.Stripe, Stripe),
23007
+ // getItem('7', IntegrationDisplayNames.GoogleSheets, GoogleSheets),
23008
+ ];
23009
+ const selectedKey = (_a = options.find(
23010
+ (option) => option.element.props.children[1] === status
23011
+ )) == null ? void 0 : _a.key;
22963
23012
  return /* @__PURE__ */ jsx4(
22964
23013
  ActionMenu4,
22965
23014
  {
22966
23015
  onClose: () => {
22967
23016
  setIsVisible(false);
22968
23017
  },
22969
- options: [
22970
- getItem("0", "All"),
22971
- getItem("1", IntegrationDisplayNames11.LiveChat, LiveChatColored),
22972
- getItem("2", IntegrationDisplayNames11.HelpDesk, HelpDeskColored),
22973
- getItem("3", IntegrationDisplayNames11.OpenAI, Chatgpt),
22974
- getItem("4", IntegrationDisplayNames11.Shopify, ShopifyColored),
22975
- getItem("5", IntegrationDisplayNames11.Mailchimp, Mailchimp)
22976
- // getItem('6', IntegrationDisplayNames.Stripe, Stripe),
22977
- // getItem('7', IntegrationDisplayNames.GoogleSheets, GoogleSheets),
22978
- ],
23018
+ options,
22979
23019
  placement: "bottom",
23020
+ selectedOptions: selectedKey ? [selectedKey] : [],
22980
23021
  triggerRenderer: /* @__PURE__ */ jsxs2(
22981
23022
  Button31,
22982
23023
  {
@@ -23252,11 +23293,11 @@ var Create_default = WorkflowCreate;
23252
23293
 
23253
23294
  // src/views/Workflows/List/View.tsx
23254
23295
  import { useState as useState32 } from "react";
23255
- import { useNavigate as useNavigate19 } from "react-router-dom";
23296
+ import { useNavigate as useNavigate20 } from "react-router-dom";
23256
23297
  import {
23257
- Button as Button34,
23258
- DesignToken as DesignToken43,
23259
- SpacingToken as SpacingToken43
23298
+ Button as Button35,
23299
+ DesignToken as DesignToken44,
23300
+ SpacingToken as SpacingToken44
23260
23301
  } from "@livechat/design-system-react-components";
23261
23302
  import { mergeDeep as mergeDeep2 } from "@livechat/developer-studio-api";
23262
23303
  import {
@@ -23267,6 +23308,64 @@ import {
23267
23308
  View as View3
23268
23309
  } from "@livechat/developer-studio-ui-react";
23269
23310
 
23311
+ // src/views/Workflows/Creator/LiveChatNavbar.tsx
23312
+ import { useCallback as useCallback18 } from "react";
23313
+ import { useNavigate as useNavigate18 } from "react-router-dom";
23314
+ import { LayoutSidebarLeft } from "@livechat/design-system-icons";
23315
+ import {
23316
+ Button as Button32,
23317
+ DesignToken as DesignToken42,
23318
+ Heading as Heading8,
23319
+ Icon as Icon37,
23320
+ SpacingToken as SpacingToken42
23321
+ } from "@livechat/design-system-react-components";
23322
+ var wrapperCss = (hasData) => css`
23323
+ flex-shrink: 0;
23324
+ height: var(${SpacingToken42.Spacing14});
23325
+ width: 100%;
23326
+ display: flex;
23327
+ padding: 0 var(${SpacingToken42.Spacing6}) 0 var(${SpacingToken42.Spacing4});
23328
+ align-items: center;
23329
+ gap: var(${SpacingToken42.Spacing2});
23330
+ border-bottom: 1px solid var(${DesignToken42.BorderBasicSecondary});
23331
+
23332
+ ${hasData && `> button:last-of-type {
23333
+ margin-left: auto;
23334
+ }`}
23335
+ `;
23336
+ function LiveChatNavbar() {
23337
+ const navigate = useNavigate18();
23338
+ const workflows = useFetchWorkflows({});
23339
+ const isLoading = workflows.isLoading;
23340
+ const hasNoData = workflows.isSuccess && workflows.data.length === 0;
23341
+ const hasData = !isLoading && !hasNoData;
23342
+ const handleClick = useCallback18(() => {
23343
+ sendMessage("toggleSideNav" /* ToggleSideNav */);
23344
+ }, []);
23345
+ return /* @__PURE__ */ jsxs2("div", { css: wrapperCss(hasData), children: [
23346
+ /* @__PURE__ */ jsx4(
23347
+ Button32,
23348
+ {
23349
+ icon: /* @__PURE__ */ jsx4(Icon37, { source: LayoutSidebarLeft }),
23350
+ kind: "plain",
23351
+ onClick: handleClick
23352
+ }
23353
+ ),
23354
+ /* @__PURE__ */ jsx4(Heading8, { size: "sm", children: "Workflows" }),
23355
+ hasData ? /* @__PURE__ */ jsx4(
23356
+ Button32,
23357
+ {
23358
+ kind: "primary",
23359
+ onClick: () => {
23360
+ navigate("create");
23361
+ },
23362
+ children: "Create workflow"
23363
+ }
23364
+ ) : null
23365
+ ] });
23366
+ }
23367
+ var LiveChatNavbar_default = LiveChatNavbar;
23368
+
23270
23369
  // src/views/Workflows/List/Grid/Grid.tsx
23271
23370
  import { SearchInput as SearchInput4 } from "@livechat/design-system-react-components";
23272
23371
  import { Grid as Grid2 } from "@livechat/developer-studio-ui-react";
@@ -23276,13 +23375,14 @@ import { useState as useState31 } from "react";
23276
23375
  import { ToggleLeft } from "@livechat/design-system-icons";
23277
23376
  import {
23278
23377
  ActionMenu as ActionMenu5,
23279
- Button as Button32,
23280
- Icon as Icon37
23378
+ Button as Button33,
23379
+ Icon as Icon38
23281
23380
  } from "@livechat/design-system-react-components";
23282
23381
  function WorkflowStatusFilter({
23283
23382
  handleStatus,
23284
23383
  status
23285
23384
  }) {
23385
+ var _a;
23286
23386
  const [isVisible, setIsVisible] = useState31(false);
23287
23387
  const items = [
23288
23388
  {
@@ -23310,6 +23410,7 @@ function WorkflowStatusFilter({
23310
23410
  }
23311
23411
  }
23312
23412
  ];
23413
+ const selectedKey = (_a = items.find((item) => item.element === status)) == null ? void 0 : _a.key;
23313
23414
  return /* @__PURE__ */ jsx4(
23314
23415
  ActionMenu5,
23315
23416
  {
@@ -23318,10 +23419,11 @@ function WorkflowStatusFilter({
23318
23419
  },
23319
23420
  options: items,
23320
23421
  placement: "bottom",
23422
+ selectedOptions: selectedKey ? [selectedKey] : [],
23321
23423
  triggerRenderer: /* @__PURE__ */ jsxs2(
23322
- Button32,
23424
+ Button33,
23323
23425
  {
23324
- icon: /* @__PURE__ */ jsx4(Icon37, { source: ToggleLeft }),
23426
+ icon: /* @__PURE__ */ jsx4(Icon38, { source: ToggleLeft }),
23325
23427
  kind: "secondary",
23326
23428
  onClick: () => {
23327
23429
  setIsVisible(!isVisible);
@@ -23339,7 +23441,7 @@ function WorkflowStatusFilter({
23339
23441
  var StatusFilter_default = WorkflowStatusFilter;
23340
23442
 
23341
23443
  // src/views/Workflows/List/Grid/Table.tsx
23342
- import { useNavigate as useNavigate18 } from "react-router-dom";
23444
+ import { useNavigate as useNavigate19 } from "react-router-dom";
23343
23445
  import {
23344
23446
  Delete as Delete3,
23345
23447
  Info as Info2,
@@ -23349,10 +23451,10 @@ import {
23349
23451
  import {
23350
23452
  ActionMenu as ActionMenu6,
23351
23453
  ActionMenuItem as ActionMenuItem2,
23352
- Button as Button33,
23353
- DesignToken as DesignToken42,
23354
- Icon as Icon38,
23355
- SpacingToken as SpacingToken42,
23454
+ Button as Button34,
23455
+ DesignToken as DesignToken43,
23456
+ Icon as Icon39,
23457
+ SpacingToken as SpacingToken43,
23356
23458
  Switch as Switch2,
23357
23459
  Tag as Tag3,
23358
23460
  Text as Text21,
@@ -23369,7 +23471,7 @@ import {
23369
23471
  } from "@livechat/developer-studio-ui-react";
23370
23472
  function WorkflowsTable({ workflowsQuery, state }) {
23371
23473
  var _a, _b, _c;
23372
- const navigate = useNavigate18();
23474
+ const navigate = useNavigate19();
23373
23475
  const notifications = useNotificationContext5();
23374
23476
  const deleteAction = useDeleteWorkflow();
23375
23477
  const activateWorkflowAction = useActivateWorkflow();
@@ -23406,7 +23508,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
23406
23508
  cursor: pointer;
23407
23509
 
23408
23510
  &:hover {
23409
- background: var(${DesignToken42.SurfacePrimaryHover});
23511
+ background: var(${DesignToken43.SurfacePrimaryHover});
23410
23512
  }
23411
23513
  `,
23412
23514
  onClick: () => {
@@ -23414,7 +23516,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
23414
23516
  navigate(`/workflow/${workflow.id}`);
23415
23517
  },
23416
23518
  children: [
23417
- /* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(Row24, { gap: `var(${SpacingToken42.Spacing2})`, noWrap: true, notPadded: true, children: [
23519
+ /* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(Row24, { gap: `var(${SpacingToken43.Spacing2})`, noWrap: true, notPadded: true, children: [
23418
23520
  /* @__PURE__ */ jsx4(Text21, { noMargin: true, size: "sm", children: workflow.name }),
23419
23521
  workflow.related_workflow_id ? /* @__PURE__ */ jsx4(
23420
23522
  Tag3,
@@ -23469,9 +23571,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
23469
23571
  }
23470
23572
  ) }),
23471
23573
  /* @__PURE__ */ jsx4("td", { children: !workflow.draft && /* @__PURE__ */ jsx4(
23472
- Button33,
23574
+ Button34,
23473
23575
  {
23474
- icon: /* @__PURE__ */ jsx4(Icon38, { source: Info2 }),
23576
+ icon: /* @__PURE__ */ jsx4(Icon39, { source: Info2 }),
23475
23577
  kind: "plain",
23476
23578
  onClick: (e) => {
23477
23579
  e.stopPropagation();
@@ -23488,7 +23590,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
23488
23590
  element: /* @__PURE__ */ jsx4(
23489
23591
  ActionMenuItem2,
23490
23592
  {
23491
- leftNode: /* @__PURE__ */ jsx4(Icon38, { source: PlayArrow }),
23593
+ leftNode: /* @__PURE__ */ jsx4(Icon39, { source: PlayArrow }),
23492
23594
  children: "Trigger manually"
23493
23595
  }
23494
23596
  ),
@@ -23501,7 +23603,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
23501
23603
  element: /* @__PURE__ */ jsx4(
23502
23604
  ActionMenuItem2,
23503
23605
  {
23504
- leftNode: /* @__PURE__ */ jsx4(Icon38, { source: Delete3 }),
23606
+ leftNode: /* @__PURE__ */ jsx4(Icon39, { source: Delete3 }),
23505
23607
  children: "Delete"
23506
23608
  }
23507
23609
  ),
@@ -23517,9 +23619,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
23517
23619
  }
23518
23620
  ],
23519
23621
  triggerRenderer: /* @__PURE__ */ jsx4(
23520
- Button33,
23622
+ Button34,
23521
23623
  {
23522
- icon: /* @__PURE__ */ jsx4(Icon38, { source: MoreHoriz2 }),
23624
+ icon: /* @__PURE__ */ jsx4(Icon39, { source: MoreHoriz2 }),
23523
23625
  kind: "text",
23524
23626
  loading: deleteAction.isLoading ? ((_g = deleteAction.variables) == null ? void 0 : _g.id) === workflow.id : void 0,
23525
23627
  size: "compact"
@@ -23538,7 +23640,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
23538
23640
  {
23539
23641
  css: css`
23540
23642
  background: transparent !important;
23541
- color: var(${DesignToken42.ContentBasicSecondary});
23643
+ color: var(${DesignToken43.ContentBasicSecondary});
23542
23644
  `,
23543
23645
  children: /* @__PURE__ */ jsx4("td", { align: "left", colSpan: 6, children: /* @__PURE__ */ jsxs2(Text21, { as: "div", size: "md", children: [
23544
23646
  "There are no",
@@ -23609,11 +23711,11 @@ var Grid_default = WorkflowsGrid;
23609
23711
 
23610
23712
  // src/views/Workflows/List/View.tsx
23611
23713
  var markedStyles = css`
23612
- color: var(${DesignToken43.ActionPrimaryDefault});
23714
+ color: var(${DesignToken44.ActionPrimaryDefault});
23613
23715
  `;
23614
23716
  function WorkflowListView() {
23615
23717
  var _a;
23616
- const navigate = useNavigate19();
23718
+ const navigate = useNavigate20();
23617
23719
  const [state, setState] = useState32({
23618
23720
  filters: {
23619
23721
  status: "All",
@@ -23628,6 +23730,7 @@ function WorkflowListView() {
23628
23730
  return /* @__PURE__ */ jsx4(Loader5, { stretch: true });
23629
23731
  }
23630
23732
  return /* @__PURE__ */ jsxs2(View3, { center: hasNoData, noWrap: true, stretch: isLoading, children: [
23733
+ getWorkflowsEnv("isLiveChatMode") ? /* @__PURE__ */ jsx4(Row25, { noMaxWidth: true, notPadded: true, children: /* @__PURE__ */ jsx4(LiveChatNavbar_default, {}) }) : null,
23631
23734
  /* @__PURE__ */ jsxs2(Row25, { topMargin: true, verticalCenter: hasNoData, children: [
23632
23735
  /* @__PURE__ */ jsx4(Column18, { width: hasNoData ? 10 : 8, children: hasNoData ? /* @__PURE__ */ jsx4(Row25, { notPadded: true, children: /* @__PURE__ */ jsx4(
23633
23736
  Intro4,
@@ -23638,7 +23741,7 @@ function WorkflowListView() {
23638
23741
  Row25,
23639
23742
  {
23640
23743
  center: true,
23641
- gap: `var(${SpacingToken43.Spacing2})`,
23744
+ gap: `var(${SpacingToken44.Spacing2})`,
23642
23745
  notPadded: true,
23643
23746
  verticalCenter: true,
23644
23747
  children: [
@@ -23658,8 +23761,8 @@ function WorkflowListView() {
23658
23761
  header: "Your workflows"
23659
23762
  }
23660
23763
  ) }),
23661
- hasData ? /* @__PURE__ */ jsx4(Column18, { pullRight: true, children: /* @__PURE__ */ jsx4(
23662
- Button34,
23764
+ hasData && !getWorkflowsEnv("isHeadless") ? /* @__PURE__ */ jsx4(Column18, { pullRight: true, children: /* @__PURE__ */ jsx4(
23765
+ Button35,
23663
23766
  {
23664
23767
  kind: "primary",
23665
23768
  onClick: () => {
@@ -23669,7 +23772,7 @@ function WorkflowListView() {
23669
23772
  }
23670
23773
  ) }) : null
23671
23774
  ] }),
23672
- /* @__PURE__ */ jsx4(Row25, { children: /* @__PURE__ */ jsxs2(Column18, { gap: `var(${SpacingToken43.Spacing10})`, noMaxWidth: true, width: 12, children: [
23775
+ /* @__PURE__ */ jsx4(Row25, { children: /* @__PURE__ */ jsxs2(Column18, { gap: `var(${SpacingToken44.Spacing10})`, noMaxWidth: true, width: 12, children: [
23673
23776
  hasData ? /* @__PURE__ */ jsx4(
23674
23777
  Grid_default,
23675
23778
  {
@@ -23702,9 +23805,9 @@ var List_default2 = WorkflowList;
23702
23805
  // src/views/Workflows/index.tsx
23703
23806
  import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
23704
23807
  function Workflows() {
23705
- const navigate = useNavigate20();
23808
+ const navigate = useNavigate21();
23706
23809
  const { userHasInstalledWorkflows, isWorkflowAppLoading } = useFetchUserInstalledWorkflows();
23707
- useEffect18(() => {
23810
+ useEffect19(() => {
23708
23811
  if (isWorkflowAppLoading) {
23709
23812
  return;
23710
23813
  }
@@ -23724,7 +23827,7 @@ function Workflows() {
23724
23827
  var Workflows_default = Workflows;
23725
23828
 
23726
23829
  // src/views/Common/LoginError.tsx
23727
- import { Button as Button35, SpacingToken as SpacingToken44 } from "@livechat/design-system-react-components";
23830
+ import { Button as Button36, SpacingToken as SpacingToken45 } from "@livechat/design-system-react-components";
23728
23831
  import {
23729
23832
  Column as Column19,
23730
23833
  Intro as Intro5,
@@ -23736,14 +23839,14 @@ var imgContainerCss2 = css`
23736
23839
  img {
23737
23840
  height: auto;
23738
23841
  max-width: 100%;
23739
- margin-bottom: var(${SpacingToken44.Spacing10});
23842
+ margin-bottom: var(${SpacingToken45.Spacing10});
23740
23843
  }
23741
23844
  `;
23742
23845
  var paragraphCss = (heading) => css`
23743
23846
  ${heading ? theme.typography.heading.xs : theme.typography.paragraph.s}
23744
- margin-top: var(${heading ? SpacingToken44.Spacing10 : SpacingToken44.Spacing2});
23847
+ margin-top: var(${heading ? SpacingToken45.Spacing10 : SpacingToken45.Spacing2});
23745
23848
  `;
23746
- var wrapperCss = css`
23849
+ var wrapperCss2 = css`
23747
23850
  display: flex;
23748
23851
  flex-direction: column;
23749
23852
  align-items: center;
@@ -23757,12 +23860,12 @@ function LoginErrorPage({
23757
23860
  onAuthorize
23758
23861
  }) {
23759
23862
  if (getWorkflowsEnv("isHeadless")) {
23760
- return /* @__PURE__ */ jsxs2("div", { css: wrapperCss, children: [
23863
+ return /* @__PURE__ */ jsxs2("div", { css: wrapperCss2, children: [
23761
23864
  /* @__PURE__ */ jsx4(Row27, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx4(Column19, { center: true, width: 10, children: /* @__PURE__ */ jsx4("div", { css: imgContainerCss2, children: welcomeImage }) }) }),
23762
23865
  /* @__PURE__ */ jsx4(Row27, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsxs2(Column19, { center: true, width: 10, children: [
23763
23866
  /* @__PURE__ */ jsx4(Intro5, { center: true, header: "Welcome to Workflows!", headerSize: "m" }),
23764
23867
  /* @__PURE__ */ jsx4("p", { css: paragraphCss(false), children: "You're using a browser that required additional login to access Workflows" }),
23765
- /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(Button35, { kind: "primary", onClick: onAuthorize, children: "Login with Text" }) })
23868
+ /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(Button36, { kind: "primary", onClick: onAuthorize, children: "Login with Text" }) })
23766
23869
  ] }) })
23767
23870
  ] });
23768
23871
  }