ahs-cti 1.0.2-beta.2 → 1.0.2-beta.3

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
@@ -9069,7 +9069,6 @@ function CallTransferDialog({ open }) {
9069
9069
  const [transferCall, { isLoading: isTransferLoading }] = usePostRequest({
9070
9070
  onSuccess: () => {
9071
9071
  sdkStateManager.setOpenCallTransferDialog(false);
9072
- sdkStateManager.clearTransferLeadData();
9073
9072
  }
9074
9073
  });
9075
9074
  const [initiateConsultCall] = usePostRequest({});
@@ -9077,7 +9076,6 @@ function CallTransferDialog({ open }) {
9077
9076
  onSuccess: () => {
9078
9077
  sdkStateManager.setConsultInfo(null);
9079
9078
  sdkStateManager.setOpenCallTransferDialog(false);
9080
- sdkStateManager.clearTransferLeadData();
9081
9079
  }
9082
9080
  });
9083
9081
  const [cancelConsultTransfer, { isLoading: isCancelConsultLoading }] = usePostRequest({
@@ -10542,7 +10540,7 @@ var formatDuration = (seconds) => {
10542
10540
  return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
10543
10541
  };
10544
10542
  function CallControls({ onDataChange }) {
10545
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb;
10543
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb;
10546
10544
  const theme = (0, import_material4.useTheme)();
10547
10545
  const state = useSDKState();
10548
10546
  const { showToast } = useToast();
@@ -10989,7 +10987,7 @@ function CallControls({ onDataChange }) {
10989
10987
  }
10990
10988
  const sdkState = (0, import_vault5.getSession)(STORAGE_KEY);
10991
10989
  const confrence = getCombineConfrenceData(sdkState, data);
10992
- const callData = __spreadValues({
10990
+ const callData = __spreadValues(__spreadValues({
10993
10991
  agent_id: data == null ? void 0 : data.agent_id,
10994
10992
  status: data == null ? void 0 : data.status,
10995
10993
  type: data == null ? void 0 : data.type,
@@ -11003,7 +11001,7 @@ function CallControls({ onDataChange }) {
11003
11001
  mode: data == null ? void 0 : data.mode,
11004
11002
  queue_name: data == null ? void 0 : data.queue_name,
11005
11003
  auto_wrapup_time: (_a4 = data == null ? void 0 : data.auto_wrapup_time) != null ? _a4 : null
11006
- }, (data == null ? void 0 : data.call_details) !== void 0 && { call_details: data.call_details });
11004
+ }, (data == null ? void 0 : data.call_details) !== void 0 && { call_details: data.call_details }), (data == null ? void 0 : data.break_details) !== void 0 && { break_details: data.break_details });
11007
11005
  sdkStateManager.updateCallData(callData);
11008
11006
  sdkStateManager.updateConferenceData([...confrence]);
11009
11007
  sdkStateManager.setConsultInfo((_b3 = data.consult_info) != null ? _b3 : null);
@@ -11364,7 +11362,38 @@ function CallControls({ onDataChange }) {
11364
11362
  marginRight: "10px"
11365
11363
  },
11366
11364
  children: [
11367
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11365
+ ((_V = (_U = state.callData) == null ? void 0 : _U.status) == null ? void 0 : _V.toUpperCase()) === "BREAK" /* BREAK */ && ((_X = (_W = state.callData) == null ? void 0 : _W.break_details) == null ? void 0 : _X.value) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: state.callData.break_details.value, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11366
+ import_material4.Box,
11367
+ {
11368
+ sx: {
11369
+ border: "1.5px solid",
11370
+ borderColor: "success.main",
11371
+ borderRadius: "50px",
11372
+ px: "8px",
11373
+ py: "3px",
11374
+ maxWidth: "80px",
11375
+ minWidth: "80px",
11376
+ overflow: "hidden",
11377
+ textAlign: "center"
11378
+ },
11379
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11380
+ import_material4.Typography,
11381
+ {
11382
+ sx: {
11383
+ color: "success.main",
11384
+ fontSize: "10px",
11385
+ fontWeight: "700",
11386
+ lineHeight: 1.2,
11387
+ overflow: "hidden",
11388
+ textOverflow: "ellipsis",
11389
+ whiteSpace: "nowrap",
11390
+ textTransform: "uppercase"
11391
+ },
11392
+ children: state.callData.break_details.value
11393
+ }
11394
+ )
11395
+ }
11396
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11368
11397
  import_material4.Typography,
11369
11398
  {
11370
11399
  sx: {
@@ -11464,7 +11493,7 @@ function CallControls({ onDataChange }) {
11464
11493
  width: "60px",
11465
11494
  textAlign: "center"
11466
11495
  },
11467
- children: (_W = (_V = (_U = state.callData) == null ? void 0 : _U.status) == null ? void 0 : _V.toUpperCase()) != null ? _W : "N/A"
11496
+ children: (__ = (_Z = (_Y = state.callData) == null ? void 0 : _Y.status) == null ? void 0 : _Z.toUpperCase()) != null ? __ : "N/A"
11468
11497
  }
11469
11498
  ),
11470
11499
  onClick: handleOpenAgentStatus,
@@ -11491,7 +11520,7 @@ function CallControls({ onDataChange }) {
11491
11520
  import_material4.Button,
11492
11521
  {
11493
11522
  variant: ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
11494
- (_Y = (_X = state.callData) == null ? void 0 : _X.status) == null ? void 0 : _Y.toUpperCase()
11523
+ (_aa = (_$ = state.callData) == null ? void 0 : _$.status) == null ? void 0 : _aa.toUpperCase()
11495
11524
  ) ? "outlined" : "contained",
11496
11525
  startIcon: isVertical ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_SupportAgent2.default, {}) : void 0,
11497
11526
  onClick: (e) => {
@@ -11505,21 +11534,21 @@ function CallControls({ onDataChange }) {
11505
11534
  },
11506
11535
  classes: {
11507
11536
  root: ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
11508
- (__ = (_Z = state.callData) == null ? void 0 : _Z.status) == null ? void 0 : __.toUpperCase()
11537
+ (_ca = (_ba = state.callData) == null ? void 0 : _ba.status) == null ? void 0 : _ca.toUpperCase()
11509
11538
  ) ? "outlined" : "enabled"
11510
11539
  },
11511
11540
  sx: __spreadValues(__spreadValues({}, ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
11512
- (_aa = (_$ = state.callData) == null ? void 0 : _$.status) == null ? void 0 : _aa.toUpperCase()
11541
+ (_ea = (_da = state.callData) == null ? void 0 : _da.status) == null ? void 0 : _ea.toUpperCase()
11513
11542
  ) ? outlined : enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11514
11543
  disabled: agentReadyLoading,
11515
11544
  children: isVertical ? "Agent Ready" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_SupportAgent2.default, {})
11516
11545
  }
11517
11546
  ) }),
11518
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_ba = state.sdkConfig) == null ? void 0 : _ba.disableHoldButton) ? "Hold feature is disabled" : ((_ca = state.callData) == null ? void 0 : _ca.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11547
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_fa = state.sdkConfig) == null ? void 0 : _fa.disableHoldButton) ? "Hold feature is disabled" : ((_ga = state.callData) == null ? void 0 : _ga.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11519
11548
  import_material4.Button,
11520
11549
  {
11521
- variant: ((_da = state.callData) == null ? void 0 : _da.hold) === 1 && ((_fa = (_ea = state.callData) == null ? void 0 : _ea.status) == null ? void 0 : _fa.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
11522
- startIcon: isVertical ? holdOrUnHoldLoading ? void 0 : ((_ga = state.callData) == null ? void 0 : _ga.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_PlayArrow2.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Pause2.default, {}) : void 0,
11550
+ variant: ((_ha = state.callData) == null ? void 0 : _ha.hold) === 1 && ((_ja = (_ia = state.callData) == null ? void 0 : _ia.status) == null ? void 0 : _ja.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
11551
+ startIcon: isVertical ? holdOrUnHoldLoading ? void 0 : ((_ka = state.callData) == null ? void 0 : _ka.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_PlayArrow2.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Pause2.default, {}) : void 0,
11523
11552
  onClick: (e) => {
11524
11553
  var _a3;
11525
11554
  e.stopPropagation();
@@ -11527,22 +11556,22 @@ function CallControls({ onDataChange }) {
11527
11556
  handleHoldToggle();
11528
11557
  }
11529
11558
  },
11530
- sx: ((_ha = state.callData) == null ? void 0 : _ha.hold) === 1 && ((_ja = (_ia = state.callData) == null ? void 0 : _ia.status) == null ? void 0 : _ja.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_la = (_ka = state.callData) == null ? void 0 : _ka.status) == null ? void 0 : _la.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_ma = state.sdkConfig) == null ? void 0 : _ma.disableHoldButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11531
- disabled: ((_oa = (_na = state.callData) == null ? void 0 : _na.status) == null ? void 0 : _oa.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_pa = state.callData) == null ? void 0 : _pa.hold) !== 1 || holdOrUnHoldLoading || ((_qa = state.sdkConfig) == null ? void 0 : _qa.disableHoldButton),
11559
+ sx: ((_la = state.callData) == null ? void 0 : _la.hold) === 1 && ((_na = (_ma = state.callData) == null ? void 0 : _ma.status) == null ? void 0 : _na.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_pa = (_oa = state.callData) == null ? void 0 : _oa.status) == null ? void 0 : _pa.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_qa = state.sdkConfig) == null ? void 0 : _qa.disableHoldButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11560
+ disabled: ((_sa = (_ra = state.callData) == null ? void 0 : _ra.status) == null ? void 0 : _sa.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_ta = state.callData) == null ? void 0 : _ta.hold) !== 1 || holdOrUnHoldLoading || ((_ua = state.sdkConfig) == null ? void 0 : _ua.disableHoldButton),
11532
11561
  children: holdOrUnHoldLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11533
11562
  import_material4.CircularProgress,
11534
11563
  {
11535
11564
  size: "20px",
11536
11565
  sx: { color: theme.palette.primary.main }
11537
11566
  }
11538
- ) : isVertical ? ((_ra = state.callData) == null ? void 0 : _ra.hold) === 1 ? "Resume" : "Hold" : ((_sa = state.callData) == null ? void 0 : _sa.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_PlayArrow2.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Pause2.default, {})
11567
+ ) : isVertical ? ((_va = state.callData) == null ? void 0 : _va.hold) === 1 ? "Resume" : "Hold" : ((_wa = state.callData) == null ? void 0 : _wa.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_PlayArrow2.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Pause2.default, {})
11539
11568
  }
11540
11569
  ) }) }),
11541
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_ta = state.sdkConfig) == null ? void 0 : _ta.disableMuteButton) ? "Mute feature is disabled" : ((_ua = state.callData) == null ? void 0 : _ua.mute) === 1 ? "Unmute" : "Mute", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11570
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_xa = state.sdkConfig) == null ? void 0 : _xa.disableMuteButton) ? "Mute feature is disabled" : ((_ya = state.callData) == null ? void 0 : _ya.mute) === 1 ? "Unmute" : "Mute", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11542
11571
  import_material4.Button,
11543
11572
  {
11544
- variant: ((_va = state.callData) == null ? void 0 : _va.mute) === 1 && ((_xa = (_wa = state.callData) == null ? void 0 : _wa.status) == null ? void 0 : _xa.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
11545
- startIcon: isVertical ? muteOrUnMuteLoading ? void 0 : ((_ya = state.callData) == null ? void 0 : _ya.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MicOff.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Mic.default, {}) : void 0,
11573
+ variant: ((_za = state.callData) == null ? void 0 : _za.mute) === 1 && ((_Ba = (_Aa = state.callData) == null ? void 0 : _Aa.status) == null ? void 0 : _Ba.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
11574
+ startIcon: isVertical ? muteOrUnMuteLoading ? void 0 : ((_Ca = state.callData) == null ? void 0 : _Ca.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MicOff.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Mic.default, {}) : void 0,
11546
11575
  onClick: (e) => {
11547
11576
  var _a3;
11548
11577
  e.stopPropagation();
@@ -11550,18 +11579,18 @@ function CallControls({ onDataChange }) {
11550
11579
  handleMuteToggle();
11551
11580
  }
11552
11581
  },
11553
- sx: ((_za = state.sdkConfig) == null ? void 0 : _za.disableMuteButton) || ((_Aa = state.callData) == null ? void 0 : _Aa.hold) === 1 ? __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ba = state.callData) == null ? void 0 : _Ba.mute) === 1 && ((_Da = (_Ca = state.callData) == null ? void 0 : _Ca.status) == null ? void 0 : _Da.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Fa = (_Ea = state.callData) == null ? void 0 : _Ea.status) == null ? void 0 : _Fa.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11554
- disabled: ((_Ha = (_Ga = state.callData) == null ? void 0 : _Ga.status) == null ? void 0 : _Ha.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_Ia = state.callData) == null ? void 0 : _Ia.mute) !== 1 || muteOrUnMuteLoading || ((_Ja = state.callData) == null ? void 0 : _Ja.hold) === 1 || ((_Ka = state.sdkConfig) == null ? void 0 : _Ka.disableMuteButton),
11582
+ sx: ((_Da = state.sdkConfig) == null ? void 0 : _Da.disableMuteButton) || ((_Ea = state.callData) == null ? void 0 : _Ea.hold) === 1 ? __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Fa = state.callData) == null ? void 0 : _Fa.mute) === 1 && ((_Ha = (_Ga = state.callData) == null ? void 0 : _Ga.status) == null ? void 0 : _Ha.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ja = (_Ia = state.callData) == null ? void 0 : _Ia.status) == null ? void 0 : _Ja.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11583
+ disabled: ((_La = (_Ka = state.callData) == null ? void 0 : _Ka.status) == null ? void 0 : _La.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_Ma = state.callData) == null ? void 0 : _Ma.mute) !== 1 || muteOrUnMuteLoading || ((_Na = state.callData) == null ? void 0 : _Na.hold) === 1 || ((_Oa = state.sdkConfig) == null ? void 0 : _Oa.disableMuteButton),
11555
11584
  children: muteOrUnMuteLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11556
11585
  import_material4.CircularProgress,
11557
11586
  {
11558
11587
  size: "20px",
11559
11588
  sx: { color: theme.palette.primary.main }
11560
11589
  }
11561
- ) : isVertical ? ((_La = state.callData) == null ? void 0 : _La.mute) === 1 ? "Unmute" : "Mute" : ((_Ma = state.callData) == null ? void 0 : _Ma.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MicOff.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Mic.default, {})
11590
+ ) : isVertical ? ((_Pa = state.callData) == null ? void 0 : _Pa.mute) === 1 ? "Unmute" : "Mute" : ((_Qa = state.callData) == null ? void 0 : _Qa.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MicOff.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Mic.default, {})
11562
11591
  }
11563
11592
  ) }) }),
11564
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_Na = state.sdkConfig) == null ? void 0 : _Na.disableCallTransferButton) ? "Transfer Call feature is disabled" : "Transfer Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11593
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_Ra = state.sdkConfig) == null ? void 0 : _Ra.disableCallTransferButton) ? "Transfer Call feature is disabled" : "Transfer Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11565
11594
  import_material4.Button,
11566
11595
  {
11567
11596
  variant: state.openCallTransferDialog ? "contained" : "outlined",
@@ -11573,12 +11602,12 @@ function CallControls({ onDataChange }) {
11573
11602
  sdkStateManager.setOpenCallTransferDialog(true);
11574
11603
  }
11575
11604
  },
11576
- sx: state.openCallTransferDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Pa = (_Oa = state.callData) == null ? void 0 : _Oa.status) == null ? void 0 : _Pa.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_Qa = state.sdkConfig) == null ? void 0 : _Qa.disableCallTransferButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11577
- disabled: ((_Sa = (_Ra = state.callData) == null ? void 0 : _Ra.status) == null ? void 0 : _Sa.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((_Ta = state.sdkConfig) == null ? void 0 : _Ta.disableCallTransferButton),
11605
+ sx: state.openCallTransferDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ta = (_Sa = state.callData) == null ? void 0 : _Sa.status) == null ? void 0 : _Ta.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_Ua = state.sdkConfig) == null ? void 0 : _Ua.disableCallTransferButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11606
+ disabled: ((_Wa = (_Va = state.callData) == null ? void 0 : _Va.status) == null ? void 0 : _Wa.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((_Xa = state.sdkConfig) == null ? void 0 : _Xa.disableCallTransferButton),
11578
11607
  children: isVertical ? "Transfer" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_TransferWithinAStation2.default, {})
11579
11608
  }
11580
11609
  ) }) }),
11581
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_Ua = state.sdkConfig) == null ? void 0 : _Ua.disableConferenceButton) ? "Conference Call feature is disabled" : "Conference Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11610
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_Ya = state.sdkConfig) == null ? void 0 : _Ya.disableConferenceButton) ? "Conference Call feature is disabled" : "Conference Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11582
11611
  import_material4.Button,
11583
11612
  {
11584
11613
  variant: state.openConferenceDialog ? "contained" : "outlined",
@@ -11590,12 +11619,12 @@ function CallControls({ onDataChange }) {
11590
11619
  sdkStateManager.setOpenConferenceDialog(true);
11591
11620
  }
11592
11621
  },
11593
- sx: state.openConferenceDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Wa = (_Va = state.callData) == null ? void 0 : _Va.status) == null ? void 0 : _Wa.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_Xa = state.sdkConfig) == null ? void 0 : _Xa.disableConferenceButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11594
- disabled: ((_Za = (_Ya = state.callData) == null ? void 0 : _Ya.status) == null ? void 0 : _Za.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((__a = state.sdkConfig) == null ? void 0 : __a.disableConferenceButton),
11622
+ sx: state.openConferenceDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((__a = (_Za = state.callData) == null ? void 0 : _Za.status) == null ? void 0 : __a.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_$a = state.sdkConfig) == null ? void 0 : _$a.disableConferenceButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11623
+ disabled: ((_bb = (_ab = state.callData) == null ? void 0 : _ab.status) == null ? void 0 : _bb.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((_cb = state.sdkConfig) == null ? void 0 : _cb.disableConferenceButton),
11595
11624
  children: isVertical ? "Conference" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Group.default, {})
11596
11625
  }
11597
11626
  ) }) }),
11598
- ((_$a = state.sdkConfig) == null ? void 0 : _$a.enableSmsServices) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: "Send SMS", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11627
+ ((_db = state.sdkConfig) == null ? void 0 : _db.enableSmsServices) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: "Send SMS", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11599
11628
  import_material4.Button,
11600
11629
  {
11601
11630
  variant: Boolean(ambulanceAnchorEl) ? "contained" : "outlined",
@@ -11610,15 +11639,15 @@ function CallControls({ onDataChange }) {
11610
11639
  }
11611
11640
  },
11612
11641
  sx: Boolean(ambulanceAnchorEl) ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ["ONCALL" /* ONCALL */, "WRAPUP" /* WRAPUP */].includes(
11613
- (_bb = (_ab = state.callData) == null ? void 0 : _ab.status) == null ? void 0 : _bb.toUpperCase()
11642
+ (_fb = (_eb = state.callData) == null ? void 0 : _eb.status) == null ? void 0 : _fb.toUpperCase()
11614
11643
  ) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11615
11644
  disabled: !["ONCALL" /* ONCALL */, "WRAPUP" /* WRAPUP */].includes(
11616
- (_db = (_cb = state.callData) == null ? void 0 : _cb.status) == null ? void 0 : _db.toUpperCase()
11645
+ (_hb = (_gb = state.callData) == null ? void 0 : _gb.status) == null ? void 0 : _hb.toUpperCase()
11617
11646
  ),
11618
11647
  children: isVertical ? "Send SMS" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_SmsSharp.default, {})
11619
11648
  }
11620
11649
  ) }),
11621
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_eb = state.sdkConfig) == null ? void 0 : _eb.disableEndCallButton) ? "End Call feature is disabled" : "End Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11650
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: ((_ib = state.sdkConfig) == null ? void 0 : _ib.disableEndCallButton) ? "End Call feature is disabled" : "End Call", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11622
11651
  import_material4.Button,
11623
11652
  {
11624
11653
  variant: [
@@ -11626,7 +11655,7 @@ function CallControls({ onDataChange }) {
11626
11655
  "RINGING" /* RINGING */,
11627
11656
  "DIALING" /* DIALING */,
11628
11657
  "WRAPUP" /* WRAPUP */
11629
- ].includes((_gb = (_fb = state.callData) == null ? void 0 : _fb.status) == null ? void 0 : _gb.toUpperCase()) && !((_hb = state.sdkConfig) == null ? void 0 : _hb.disableEndCallButton) ? "contained" : "outlined",
11658
+ ].includes((_kb = (_jb = state.callData) == null ? void 0 : _jb.status) == null ? void 0 : _kb.toUpperCase()) && !((_lb = state.sdkConfig) == null ? void 0 : _lb.disableEndCallButton) ? "contained" : "outlined",
11630
11659
  startIcon: isVertical && !endCallLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_CallEnd2.default, {}) : void 0,
11631
11660
  onClick: (e) => {
11632
11661
  var _a3, _b2, _c2;
@@ -11645,7 +11674,7 @@ function CallControls({ onDataChange }) {
11645
11674
  "RINGING" /* RINGING */,
11646
11675
  "DIALING" /* DIALING */,
11647
11676
  "WRAPUP" /* WRAPUP */
11648
- ].includes((_jb = (_ib = state.callData) == null ? void 0 : _ib.status) == null ? void 0 : _jb.toUpperCase()) && !((_kb = state.sdkConfig) == null ? void 0 : _kb.disableEndCallButton) ? __spreadValues(__spreadProps(__spreadValues({}, enabled), {
11677
+ ].includes((_nb = (_mb = state.callData) == null ? void 0 : _mb.status) == null ? void 0 : _nb.toUpperCase()) && !((_ob = state.sdkConfig) == null ? void 0 : _ob.disableEndCallButton) ? __spreadValues(__spreadProps(__spreadValues({}, enabled), {
11649
11678
  borderRight: "1px",
11650
11679
  backgroundColor: "error.main",
11651
11680
  minWidth: "60px !important",
@@ -11669,11 +11698,11 @@ function CallControls({ onDataChange }) {
11669
11698
  "RINGING" /* RINGING */,
11670
11699
  "DIALING" /* DIALING */,
11671
11700
  "WRAPUP" /* WRAPUP */
11672
- ].includes((_mb = (_lb = state.callData) == null ? void 0 : _lb.status) == null ? void 0 : _mb.toUpperCase()) || endCallLoading || ((_nb = state.sdkConfig) == null ? void 0 : _nb.disableEndCallButton),
11701
+ ].includes((_qb = (_pb = state.callData) == null ? void 0 : _pb.status) == null ? void 0 : _qb.toUpperCase()) || endCallLoading || ((_rb = state.sdkConfig) == null ? void 0 : _rb.disableEndCallButton),
11673
11702
  children: endCallLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.CircularProgress, { size: "20px", color: "error" }) : isVertical ? "End Call" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_CallEnd2.default, {})
11674
11703
  }
11675
11704
  ) }) }),
11676
- !((_ob = state.sdkConfig) == null ? void 0 : _ob.disabledMoreOptionsButton) && processList && (processList == null ? void 0 : processList.length) > 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: "Switch Process", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11705
+ !((_sb = state.sdkConfig) == null ? void 0 : _sb.disabledMoreOptionsButton) && processList && (processList == null ? void 0 : processList.length) > 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Tooltip, { title: "Switch Process", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11677
11706
  import_material4.Button,
11678
11707
  {
11679
11708
  variant: Boolean(moreOptionsAnchorEl) ? "contained" : "outlined",
@@ -11689,7 +11718,7 @@ function CallControls({ onDataChange }) {
11689
11718
  },
11690
11719
  sx: Boolean(moreOptionsAnchorEl) ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
11691
11720
  disabled: !["BREAK" /* BREAK */, "IDLE" /* IDLE */].includes(
11692
- (_qb = (_pb = state.callData) == null ? void 0 : _pb.status) == null ? void 0 : _qb.toUpperCase()
11721
+ (_ub = (_tb = state.callData) == null ? void 0 : _tb.status) == null ? void 0 : _ub.toUpperCase()
11693
11722
  ),
11694
11723
  children: isVertical ? "Switch Process" : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_MoreVert.default, {})
11695
11724
  }
@@ -11722,7 +11751,7 @@ function CallControls({ onDataChange }) {
11722
11751
  transition: theme.transitions.create(["box-shadow", "transform"], {
11723
11752
  duration: theme.transitions.duration.short
11724
11753
  }),
11725
- visibility: showIframe && !((_rb = state.sdkConfig) == null ? void 0 : _rb.disableSoftPhone) ? "visible" : "hidden",
11754
+ visibility: showIframe && !((_vb = state.sdkConfig) == null ? void 0 : _vb.disableSoftPhone) ? "visible" : "hidden",
11726
11755
  userSelect: "none"
11727
11756
  },
11728
11757
  children: [
@@ -11757,7 +11786,7 @@ function CallControls({ onDataChange }) {
11757
11786
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material4.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
11758
11787
  "iframe",
11759
11788
  {
11760
- src: `${(_sb = state.urlConfig) == null ? void 0 : _sb.iframeURL}/static/phone/index.html?user_id=${(_tb = state.urlConfig) == null ? void 0 : _tb.id}&api_url=${(_ub = state.urlConfig) == null ? void 0 : _ub.iframeAPIURL}&token=${(_vb = state.authorization) == null ? void 0 : _vb.accessToken}`,
11789
+ src: `${(_wb = state.urlConfig) == null ? void 0 : _wb.iframeURL}/static/phone/index.html?user_id=${(_xb = state.urlConfig) == null ? void 0 : _xb.id}&api_url=${(_yb = state.urlConfig) == null ? void 0 : _yb.iframeAPIURL}&token=${(_zb = state.authorization) == null ? void 0 : _zb.accessToken}`,
11761
11790
  height: 380,
11762
11791
  width: 420,
11763
11792
  allow: "camera; microphone; autoplay",