call-control-sdk 6.4.8 → 6.4.9-dev.0

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
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
21
 
22
22
  // call-control-sdk/lib/services/endPoint.ts
23
- var IP = "cti.aighospitals.com";
23
+ var IP = "uat-cti.aighospitals.com";
24
24
  var BASE_URL = `https://${IP}:8095`;
25
25
  var WS_BASE_URL = `wss://${IP}:8095`;
26
26
  var VERSION = {
@@ -91,6 +91,8 @@ var SDKStateManager = class {
91
91
  iframePosition: { x: 10, y: 80 },
92
92
  callData: {
93
93
  agent_id: "",
94
+ hold: 0,
95
+ mute: 0,
94
96
  status: "",
95
97
  type: "",
96
98
  event_time: "",
@@ -147,7 +149,9 @@ var SDKStateManager = class {
147
149
  isCallStart: false,
148
150
  isMergeCall: false
149
151
  }
150
- ]
152
+ ],
153
+ hold: 0,
154
+ mute: 0
151
155
  };
152
156
  }
153
157
  loadFromStorage() {
@@ -366,7 +370,58 @@ var SDKStateManager = class {
366
370
  this.notifyListeners();
367
371
  }
368
372
  resetConferenceLines() {
369
- this.state.conferenceLine = this.getInitialState().conferenceLine;
373
+ this.state.conferenceLine = [
374
+ {
375
+ line: 1,
376
+ status: "IDLE",
377
+ type: "",
378
+ phone: "",
379
+ isMute: false,
380
+ isHold: false,
381
+ isCallStart: false,
382
+ isMergeCall: false
383
+ },
384
+ {
385
+ line: 2,
386
+ status: "IDLE",
387
+ type: "",
388
+ phone: "",
389
+ isMute: false,
390
+ isHold: false,
391
+ isCallStart: false,
392
+ isMergeCall: false
393
+ },
394
+ {
395
+ line: 3,
396
+ status: "IDLE",
397
+ type: "",
398
+ phone: "",
399
+ isMute: false,
400
+ isHold: false,
401
+ isCallStart: false,
402
+ isMergeCall: false
403
+ },
404
+ {
405
+ line: 4,
406
+ status: "IDLE",
407
+ type: "",
408
+ phone: "",
409
+ isMute: false,
410
+ isHold: false,
411
+ isCallStart: false,
412
+ isMergeCall: false
413
+ },
414
+ {
415
+ line: 5,
416
+ status: "IDLE",
417
+ type: "",
418
+ phone: "",
419
+ isMute: false,
420
+ isHold: false,
421
+ isCallStart: false,
422
+ isMergeCall: false
423
+ }
424
+ ];
370
425
  this.saveToStorage();
371
426
  this.notifyListeners();
372
427
  }
@@ -867,6 +922,7 @@ var useEndCall = () => {
867
922
  endcall_type: "CLOSE"
868
923
  };
869
924
  return axios_default.post(END_POINT.END_CALL, payload).then((res) => {
925
+ sdkStateManager.resetConferenceLines();
870
926
  sdkStateManager.endCall();
871
927
  setData(res == null ? void 0 : res.data);
872
928
  setSuccess(true);
@@ -911,6 +967,7 @@ var useClickToCall = () => {
911
967
  phone_number: data2 == null ? void 0 : data2.mobileNumber
912
968
  };
913
969
  return axios_default.post(END_POINT.CLICK_TO_CALL, payload).then((res) => {
970
+ sdkStateManager.resetConferenceLines();
914
971
  setData(res == null ? void 0 : res.data);
915
972
  setSuccess(true);
916
973
  return res == null ? void 0 : res.data;
@@ -1285,8 +1342,6 @@ import {
1285
1342
  CallEnd,
1286
1343
  CallSplit,
1287
1344
  Close,
1288
- Mic,
1289
- MicOff,
1290
1345
  Pause,
1291
1346
  PhoneDisabled,
1292
1347
  PlayArrow,
@@ -1311,7 +1366,7 @@ import {
1311
1366
  TableBody,
1312
1367
  CircularProgress
1313
1368
  } from "@mui/material";
1314
- import { useEffect as useEffect4, useMemo, useState as useState9 } from "react";
1369
+ import { useEffect as useEffect4, useState as useState9 } from "react";
1315
1370
 
1316
1371
  // call-control-sdk/lib/components/styles.ts
1317
1372
  import { useTheme } from "@mui/material";
@@ -1379,8 +1434,8 @@ var styles_default = useStyles;
1379
1434
 
1380
1435
  // call-control-sdk/lib/components/dialog.tsx
1381
1436
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1382
- var ConferenceTableRow = ({ each, isMergeCall }) => {
1383
- var _a2, _b, _c, _d, _e;
1437
+ var ConferenceTableRow = ({ each }) => {
1438
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1384
1439
  const state = useSDKState();
1385
1440
  const { showToast } = useToast();
1386
1441
  const { disabled, enabled, outlined } = styles_default({
@@ -1392,7 +1447,6 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1392
1447
  const [conferenceCallStart, setConferenceCallStart] = useState9(false);
1393
1448
  const [conferenceCallMerge, setConferenceCallMerge] = useState9(false);
1394
1449
  const [conferenceCallHoldOrUnHold, setConferenceCallHoldOrUnHold] = useState9(false);
1395
- const [conferenceCallMuteOrUnMute, setConferenceCallMuteOrUnMute] = useState9(false);
1396
1450
  const [conferenceCallEnd, setConferenceCallEnd] = useState9(false);
1397
1451
  const onConferenceLineUpdate = (line, data) => {
1398
1452
  sdkStateManager.setConferenceLine(__spreadValues(__spreadValues({}, line), data));
@@ -1468,30 +1522,6 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1468
1522
  setConferenceCallHoldOrUnHold(false);
1469
1523
  });
1470
1524
  };
1471
- const onMuteOrUnMuteConferenceCall = (line, data, type) => {
1472
- var _a3, _b2, _c2, _d2;
1473
- const line_used = __spreadValues(__spreadValues({}, line), data);
1474
- setConferenceCallMuteOrUnMute(true);
1475
- const payload = {
1476
- action: "EXTERNAL_CONFERENCE",
1477
- operation: type,
1478
- channel_no: type === "MUTEUSER" ? `mute${line_used.line}` : `play${line_used.line}`,
1479
- userid: (_b2 = (_a3 = state.callData) == null ? void 0 : _a3.agent_id) != null ? _b2 : "",
1480
- thirdparty_no: line_used.phone,
1481
- process: (_d2 = (_c2 = state.callData) == null ? void 0 : _c2.process_name) != null ? _d2 : ""
1482
- };
1483
- axios_default.post(END_POINT.CONFERENCE_CALL_MUTE_OT_UN_MUTE, payload).then((res) => {
1484
- var _a4;
1485
- showToast((_a4 = res.data) == null ? void 0 : _a4.message, "success");
1486
- sdkStateManager.setConferenceLine(__spreadValues(__spreadValues({}, line), data));
1487
- }).catch((err) => {
1488
- var _a4, _b3, _c3, _d3;
1489
- const message = ((_b3 = (_a4 = err.response) == null ? void 0 : _a4.data) == null ? void 0 : _b3.detail) || ((_d3 = (_c3 = err.response) == null ? void 0 : _c3.data) == null ? void 0 : _d3.message) || err.message || "An unknown error occurred";
1490
- showToast(message, "error");
1491
- }).finally(() => {
1492
- setConferenceCallMuteOrUnMute(false);
1493
- });
1494
- };
1495
1525
  const onEndConferenceCall = (line, data) => {
1496
1526
  var _a3, _b2, _c2, _d2;
1497
1527
  const line_used = __spreadValues(__spreadValues({}, line), data);
@@ -1517,6 +1547,38 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1517
1547
  setConferenceCallEnd(false);
1518
1548
  });
1519
1549
  };
1550
+ const [holdOrUnHold, { isLoading: holdOrUnHoldLoading }] = usePostRequest({
1551
+ onSuccess: () => {
1552
+ sdkStateManager.setHolding(!state.isHolding);
1553
+ },
1554
+ onError: (error) => {
1555
+ console.log("\u274C Hold operation error:", error);
1556
+ }
1557
+ });
1558
+ const [muteOrUnMute, { isLoading: muteOrUnMuteLoading }] = usePostRequest({
1559
+ onSuccess: () => {
1560
+ sdkStateManager.setMuted(!state.isMuted);
1561
+ },
1562
+ onError: (error) => {
1563
+ console.log("\u274C Mute operation error:", error);
1564
+ }
1565
+ });
1566
+ const handleHoldToggle = () => {
1567
+ var _a3;
1568
+ const payload = {
1569
+ action: ((_a3 = state.callData) == null ? void 0 : _a3.hold) === 1 ? "UNHOLD" : "HOLD",
1570
+ userId: state.agentId
1571
+ };
1572
+ holdOrUnHold(END_POINT.HOLD_CALL, payload);
1573
+ };
1574
+ const handleMuteToggle = () => {
1575
+ var _a3;
1576
+ const payload = {
1577
+ action: ((_a3 = state.callData) == null ? void 0 : _a3.mute) === 1 ? "UNMUTE" : "MUTE",
1578
+ userId: state.agentId
1579
+ };
1580
+ muteOrUnMute(END_POINT.MUTE_CALL, payload);
1581
+ };
1520
1582
  return /* @__PURE__ */ jsxs2(
1521
1583
  TableRow,
1522
1584
  {
@@ -1528,7 +1590,9 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1528
1590
  TableCell,
1529
1591
  {
1530
1592
  sx: {
1531
- padding: "6px"
1593
+ padding: "6px",
1594
+ flex: 1,
1595
+ width: "100px"
1532
1596
  },
1533
1597
  children: /* @__PURE__ */ jsxs2(Typography, { children: [
1534
1598
  "Line ",
@@ -1541,7 +1605,8 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1541
1605
  TableCell,
1542
1606
  {
1543
1607
  sx: {
1544
- padding: "6px"
1608
+ padding: "6px",
1609
+ width: "100px"
1545
1610
  },
1546
1611
  children: /* @__PURE__ */ jsx2(
1547
1612
  Typography,
@@ -1549,7 +1614,8 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1549
1614
  variant: "body2",
1550
1615
  sx: {
1551
1616
  px: 1,
1552
- borderRadius: "10px"
1617
+ borderRadius: "10px",
1618
+ flex: 1
1553
1619
  },
1554
1620
  children: (_e = each == null ? void 0 : each.status) != null ? _e : ""
1555
1621
  }
@@ -1560,25 +1626,8 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1560
1626
  TableCell,
1561
1627
  {
1562
1628
  sx: {
1563
- padding: "6px"
1564
- },
1565
- children: /* @__PURE__ */ jsx2(
1566
- Button,
1567
- {
1568
- sx: {
1569
- textTransform: "capitalize"
1570
- },
1571
- size: "small",
1572
- children: /* @__PURE__ */ jsx2(Typography, { variant: "body2", children: (each == null ? void 0 : each.line) === 1 ? "Internal" : "External" })
1573
- }
1574
- )
1575
- }
1576
- ),
1577
- /* @__PURE__ */ jsx2(
1578
- TableCell,
1579
- {
1580
- sx: {
1581
- padding: "6px"
1629
+ padding: "6px",
1630
+ flex: 1
1582
1631
  },
1583
1632
  children: /* @__PURE__ */ jsx2(
1584
1633
  TextField,
@@ -1587,7 +1636,7 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1587
1636
  placeholder: "Phone Number",
1588
1637
  fullWidth: true,
1589
1638
  value: (each == null ? void 0 : each.phone) || "",
1590
- disabled: (each == null ? void 0 : each.line) === 1 || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "DISCONNECTED" || (each == null ? void 0 : each.status) === "CONFERENCE" || (each == null ? void 0 : each.status) === "HOLD" || (each == null ? void 0 : each.status) === "MUTE",
1639
+ disabled: (each == null ? void 0 : each.line) === 1 || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "DISCONNECTED" || (each == null ? void 0 : each.status) === "CONFERENCE" || (each == null ? void 0 : each.status) === "HOLD" || (each == null ? void 0 : each.status) === "MUTE" || (each == null ? void 0 : each.status) === "DIALING" || (each == null ? void 0 : each.status) === "RINGING",
1591
1640
  onChange: (e) => {
1592
1641
  onConferenceLineUpdate(each, { phone: e.target.value });
1593
1642
  }
@@ -1599,17 +1648,100 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1599
1648
  TableCell,
1600
1649
  {
1601
1650
  sx: {
1602
- padding: "6px"
1651
+ padding: "6px",
1652
+ // width: "200px",
1653
+ flex: 1
1603
1654
  },
1604
1655
  children: /* @__PURE__ */ jsxs2(
1605
1656
  Box,
1606
1657
  {
1607
1658
  sx: {
1659
+ width: "100%",
1608
1660
  display: "flex",
1609
1661
  alignItems: "center",
1610
- justifyContent: "space-around"
1662
+ justifyContent: "flex-start",
1663
+ gap: "10px"
1611
1664
  },
1612
1665
  children: [
1666
+ (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ jsx2(Tooltip, { title: ((_f = state.callData) == null ? void 0 : _f.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ jsx2(
1667
+ Button,
1668
+ {
1669
+ variant: ((_g = state.callData) == null ? void 0 : _g.hold) === 1 && ((_i = (_h = state.callData) == null ? void 0 : _h.status) == null ? void 0 : _i.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
1670
+ onClick: (e) => {
1671
+ e.stopPropagation();
1672
+ handleHoldToggle();
1673
+ },
1674
+ sx: ((_j = state.callData) == null ? void 0 : _j.hold) === 1 && ((_l = (_k = state.callData) == null ? void 0 : _k.status) == null ? void 0 : _l.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_n = (_m = state.callData) == null ? void 0 : _m.status) == null ? void 0 : _n.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1675
+ disabled: ((_p = (_o = state.callData) == null ? void 0 : _o.status) == null ? void 0 : _p.toUpperCase()) !== "ONCALL" && ((_q = state.callData) == null ? void 0 : _q.hold) !== 1 || holdOrUnHoldLoading,
1676
+ children: ((_r = state.callData) == null ? void 0 : _r.hold) === 1 ? /* @__PURE__ */ jsxs2(
1677
+ Box,
1678
+ {
1679
+ sx: {
1680
+ display: "flex",
1681
+ alignItems: "center",
1682
+ justifyContent: "center",
1683
+ gap: "5px",
1684
+ width: "98px"
1685
+ },
1686
+ children: [
1687
+ /* @__PURE__ */ jsx2(
1688
+ Typography,
1689
+ {
1690
+ variant: "body2",
1691
+ sx: {
1692
+ fontSize: "12px",
1693
+ color: ((_s = state.callData) == null ? void 0 : _s.hold) === 1 ? "#fff" : "initial"
1694
+ },
1695
+ children: "Unhold"
1696
+ }
1697
+ ),
1698
+ holdOrUnHoldLoading ? /* @__PURE__ */ jsx2(
1699
+ CircularProgress,
1700
+ {
1701
+ size: "16px",
1702
+ sx: {
1703
+ color: theme.palette.primary.main
1704
+ }
1705
+ }
1706
+ ) : /* @__PURE__ */ jsx2(PlayArrow, {})
1707
+ ]
1708
+ }
1709
+ ) : /* @__PURE__ */ jsxs2(
1710
+ Box,
1711
+ {
1712
+ sx: {
1713
+ display: "flex",
1714
+ alignItems: "center",
1715
+ justifyContent: "center",
1716
+ gap: "5px",
1717
+ width: "98px"
1718
+ },
1719
+ children: [
1720
+ /* @__PURE__ */ jsx2(
1721
+ Typography,
1722
+ {
1723
+ variant: "body2",
1724
+ sx: {
1725
+ color: ((_t = state.callData) == null ? void 0 : _t.hold) === 1 ? "#fff" : "#000",
1726
+ fontSize: "12px"
1727
+ },
1728
+ children: "Hold"
1729
+ }
1730
+ ),
1731
+ holdOrUnHoldLoading ? /* @__PURE__ */ jsx2(
1732
+ CircularProgress,
1733
+ {
1734
+ size: "16px",
1735
+ sx: {
1736
+ color: theme.palette.primary.main
1737
+ }
1738
+ }
1739
+ ) : /* @__PURE__ */ jsx2(Pause, {})
1740
+ ]
1741
+ }
1742
+ )
1743
+ }
1744
+ ) }),
1613
1745
  (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: "Call", children: /* @__PURE__ */ jsx2(
1614
1746
  Button,
1615
1747
  {
@@ -1647,31 +1779,25 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1647
1779
  )
1648
1780
  }
1649
1781
  ) }),
1650
- (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ jsx2(Tooltip, { title: "Merge Call", children: /* @__PURE__ */ jsxs2(
1782
+ (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: "Merge Call", children: /* @__PURE__ */ jsx2(
1651
1783
  Button,
1652
1784
  {
1653
- variant: isMergeCall ? "contained" : "outlined",
1654
- sx: isMergeCall ? __spreadProps(__spreadValues({}, enabled), { padding: "0px 16px" }) : __spreadProps(__spreadValues({}, disabled), { padding: "0px 16px" }),
1785
+ variant: (each == null ? void 0 : each.status) === "ONCALL" ? "contained" : "outlined",
1786
+ sx: (each == null ? void 0 : each.status) === "ONCALL" ? __spreadValues({}, enabled) : __spreadValues({}, disabled),
1655
1787
  onClick: () => {
1656
1788
  onMergeConferenceCall(each, {
1657
1789
  isMergeCall: true
1658
1790
  });
1659
1791
  },
1660
- disabled: !isMergeCall || conferenceCallMerge,
1661
- children: [
1662
- (each == null ? void 0 : each.isMergeCall) ? "Merged" : "Merge",
1663
- conferenceCallMerge ? /* @__PURE__ */ jsx2(CircularProgress, { size: "20px" }) : /* @__PURE__ */ jsx2(CallSplit, {})
1664
- ]
1792
+ disabled: (each == null ? void 0 : each.status) !== "ONCALL",
1793
+ children: conferenceCallMerge ? /* @__PURE__ */ jsx2(CircularProgress, { size: "20px" }) : /* @__PURE__ */ jsx2(CallSplit, {})
1665
1794
  }
1666
1795
  ) }),
1667
- /* @__PURE__ */ jsx2(Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Un Hold", children: /* @__PURE__ */ jsx2(
1796
+ (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Un Hold", children: /* @__PURE__ */ jsx2(
1668
1797
  Button,
1669
1798
  {
1670
1799
  variant: (each == null ? void 0 : each.status) === "HOLD" ? "contained" : "outlined",
1671
- sx: (each == null ? void 0 : each.status) === "DISCONNECTED" || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "CONFERENCE" || (each == null ? void 0 : each.status) === "DIALING" || (each == null ? void 0 : each.status) === "RINGING" ? __spreadValues({}, disabled) : (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "CONFERENCE" ? (
1672
- // each.status === "IDLE"
1673
- __spreadValues({}, outlined)
1674
- ) : __spreadValues({}, disabled),
1800
+ sx: (each == null ? void 0 : each.status) === "CONFERENCE" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1675
1801
  onClick: () => {
1676
1802
  if (each.status === "HOLD") {
1677
1803
  onHoldOrUnHoldConferenceCall(each, { isHold: false }, "UNHOLDUSER");
@@ -1679,7 +1805,11 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1679
1805
  onHoldOrUnHoldConferenceCall(each, { isHold: true }, "HOLDUSER");
1680
1806
  }
1681
1807
  },
1682
- disabled: (each == null ? void 0 : each.status) === "DISCONNECTED" || (each == null ? void 0 : each.status) === "IDLE" || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "DIALING" || (each == null ? void 0 : each.status) === "RINGING" || conferenceCallHoldOrUnHold,
1808
+ disabled: (each == null ? void 0 : each.status) !== "CONFERENCE" && (each == null ? void 0 : each.status) !== "HOLD" || // each?.status === "IDLE" ||
1809
+ // each?.status === "ONCALL" ||
1810
+ // each?.status === "DIALING" ||
1811
+ // each?.status === "RINGING" ||
1812
+ conferenceCallHoldOrUnHold,
1683
1813
  children: conferenceCallHoldOrUnHold ? /* @__PURE__ */ jsx2(
1684
1814
  CircularProgress,
1685
1815
  {
@@ -1691,31 +1821,7 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1691
1821
  ) : each.status === "HOLD" ? /* @__PURE__ */ jsx2(PlayArrow, {}) : /* @__PURE__ */ jsx2(Pause, {})
1692
1822
  }
1693
1823
  ) }),
1694
- /* @__PURE__ */ jsx2(Tooltip, { title: each.status !== "MUTE" ? "Mute" : "Un Mute", children: /* @__PURE__ */ jsx2(
1695
- Button,
1696
- {
1697
- variant: each.status === "MUTE" ? "contained" : "outlined",
1698
- sx: each.status === "DISCONNECTED" || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "CONFERENCE" || (each == null ? void 0 : each.status) === "DIALING" || (each == null ? void 0 : each.status) === "RINGING" ? __spreadValues({}, disabled) : (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "CONFERENCE" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1699
- onClick: () => {
1700
- if (each.status === "MUTE") {
1701
- onMuteOrUnMuteConferenceCall(each, { isMute: false }, "PLAYUSER");
1702
- } else {
1703
- onMuteOrUnMuteConferenceCall(each, { isMute: true }, "MUTEUSER");
1704
- }
1705
- },
1706
- disabled: (each == null ? void 0 : each.status) === "DISCONNECTED" || (each == null ? void 0 : each.status) === "IDLE" || (each == null ? void 0 : each.status) === "HOLD" || (each == null ? void 0 : each.status) === "ONCALL" || (each == null ? void 0 : each.status) === "DIALING" || (each == null ? void 0 : each.status) === "RINGING" || conferenceCallMuteOrUnMute,
1707
- children: conferenceCallMuteOrUnMute ? /* @__PURE__ */ jsx2(
1708
- CircularProgress,
1709
- {
1710
- size: "20px",
1711
- sx: {
1712
- color: theme.palette.primary.main
1713
- }
1714
- }
1715
- ) : each.status === "MUTE" ? /* @__PURE__ */ jsx2(MicOff, {}) : /* @__PURE__ */ jsx2(Mic, {})
1716
- }
1717
- ) }),
1718
- (each == null ? void 0 : each.line) !== 1 ? /* @__PURE__ */ jsx2(Tooltip, { title: "End Call", children: /* @__PURE__ */ jsx2(
1824
+ (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: "End Call", children: /* @__PURE__ */ jsx2(
1719
1825
  Button,
1720
1826
  {
1721
1827
  variant: (each == null ? void 0 : each.status) !== "IDLE" && (each == null ? void 0 : each.status) !== "DISCONNECTED" ? "contained" : "outlined",
@@ -1749,32 +1855,7 @@ var ConferenceTableRow = ({ each, isMergeCall }) => {
1749
1855
  }
1750
1856
  ) : /* @__PURE__ */ jsx2(CallEnd, {})
1751
1857
  }
1752
- ) }) : /* @__PURE__ */ jsx2(
1753
- Button,
1754
- {
1755
- variant: (each == null ? void 0 : each.status) !== "IDLE" || (each == null ? void 0 : each.status) !== "DISCONNECTED" ? "contained" : "outlined",
1756
- color: "error",
1757
- sx: {
1758
- display: "none"
1759
- },
1760
- onClick: () => {
1761
- onEndConferenceCall(each, {
1762
- isCallStart: false,
1763
- isMergeCall: false,
1764
- isMute: false,
1765
- isHold: false
1766
- });
1767
- },
1768
- disabled: (each == null ? void 0 : each.status) === "IDLE" || (each == null ? void 0 : each.status) === "DISCONNECTED" || conferenceCallEnd,
1769
- children: conferenceCallEnd ? /* @__PURE__ */ jsx2(
1770
- CircularProgress,
1771
- {
1772
- size: "20px",
1773
- color: "error"
1774
- }
1775
- ) : /* @__PURE__ */ jsx2(CallEnd, {})
1776
- }
1777
- )
1858
+ ) })
1778
1859
  ]
1779
1860
  }
1780
1861
  )
@@ -1815,22 +1896,12 @@ function ConferenceDialog() {
1815
1896
  setConferenceCallEndAll(false);
1816
1897
  });
1817
1898
  };
1818
- const isMergeCall = useMemo(() => {
1819
- var _a3;
1820
- return (_a3 = state == null ? void 0 : state.conferenceLine) == null ? void 0 : _a3.some((each) => {
1821
- if ((each == null ? void 0 : each.line) !== 1) {
1822
- return (each == null ? void 0 : each.status) === "ONCALL";
1823
- }
1824
- return false;
1825
- });
1826
- }, [state == null ? void 0 : state.conferenceLine]);
1827
1899
  return /* @__PURE__ */ jsx2(Fragment, { children: /* @__PURE__ */ jsx2(
1828
1900
  Dialog,
1829
1901
  {
1830
1902
  open: state.openConferenceDialog,
1831
1903
  "aria-labelledby": "alert-dialog-title",
1832
1904
  "aria-describedby": "alert-dialog-description",
1833
- fullWidth: true,
1834
1905
  maxWidth: "md",
1835
1906
  children: /* @__PURE__ */ jsxs2(Paper, { sx: { borderRadius: 2 }, children: [
1836
1907
  /* @__PURE__ */ jsxs2(
@@ -1899,15 +1970,6 @@ function ConferenceDialog() {
1899
1970
  children: "Status"
1900
1971
  }
1901
1972
  ),
1902
- /* @__PURE__ */ jsx2(
1903
- TableCell,
1904
- {
1905
- sx: {
1906
- padding: "6px"
1907
- },
1908
- children: "Call Type"
1909
- }
1910
- ),
1911
1973
  /* @__PURE__ */ jsx2(
1912
1974
  TableCell,
1913
1975
  {
@@ -1929,13 +1991,7 @@ function ConferenceDialog() {
1929
1991
  ]
1930
1992
  }
1931
1993
  ) }),
1932
- /* @__PURE__ */ jsx2(TableBody, { children: state == null ? void 0 : state.conferenceLine.map((each) => /* @__PURE__ */ jsx2(
1933
- ConferenceTableRow,
1934
- {
1935
- each,
1936
- isMergeCall
1937
- }
1938
- )) })
1994
+ /* @__PURE__ */ jsx2(TableBody, { children: state == null ? void 0 : state.conferenceLine.map((each) => /* @__PURE__ */ jsx2(ConferenceTableRow, { each })) })
1939
1995
  ]
1940
1996
  }
1941
1997
  )
@@ -2841,19 +2897,19 @@ var getCombineConfrenceData = (localState, apiData) => {
2841
2897
  const localConfrenceData = localState == null ? void 0 : localState.conferenceLine;
2842
2898
  const apiConferenceData = apiData == null ? void 0 : apiData.conferencestatus;
2843
2899
  const updatedConferenceData = localConfrenceData.map((item) => {
2844
- var _a2, _b, _c, _d;
2900
+ var _a2, _b, _c, _d, _e;
2845
2901
  if ((item == null ? void 0 : item.line) === 1) {
2846
2902
  const statusKey = `line_${item.line}_status`;
2847
2903
  return __spreadProps(__spreadValues({}, item), {
2848
2904
  line: 1,
2849
- status: (_a2 = apiConferenceData[statusKey]) != null ? _a2 : item == null ? void 0 : item.status,
2850
- phone: (_c = (_b = localState == null ? void 0 : localState.callData) == null ? void 0 : _b.phone_number) != null ? _c : ""
2905
+ status: (_b = apiConferenceData[statusKey]) != null ? _b : (_a2 = localState == null ? void 0 : localState.callData) == null ? void 0 : _a2.status,
2906
+ phone: (_d = (_c = localState == null ? void 0 : localState.callData) == null ? void 0 : _c.phone_number) != null ? _d : ""
2851
2907
  });
2852
2908
  } else {
2853
2909
  const statusKey = `line_${item.line}_status`;
2854
2910
  const phoneKey = `line_${item.line}_phonenumber`;
2855
2911
  return __spreadProps(__spreadValues({}, item), {
2856
- status: (_d = apiConferenceData[statusKey]) != null ? _d : item.status,
2912
+ status: (_e = apiConferenceData[statusKey]) != null ? _e : item.status,
2857
2913
  phone: apiConferenceData[phoneKey] === null || apiConferenceData[phoneKey] === "0" ? item.phone : apiConferenceData[phoneKey]
2858
2914
  });
2859
2915
  }
@@ -2866,7 +2922,7 @@ var formatDuration = (seconds) => {
2866
2922
  return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
2867
2923
  };
2868
2924
  function CallControls({ onDataChange }) {
2869
- 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;
2925
+ 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;
2870
2926
  const theme = useTheme3();
2871
2927
  const state = useSDKState();
2872
2928
  const { showToast } = useToast();
@@ -2931,7 +2987,11 @@ function CallControls({ onDataChange }) {
2931
2987
  });
2932
2988
  const [readyAgentStatus, { isLoading: agentReadyLoading }] = usePostRequest();
2933
2989
  const [updateAgentStatus, { isLoading }] = usePostRequest();
2934
- const [endCall, { isLoading: endCallLoading }] = usePostRequest();
2990
+ const [endCall, { isLoading: endCallLoading }] = usePostRequest({
2991
+ onSuccess: () => {
2992
+ sdkStateManager.resetConferenceLines();
2993
+ }
2994
+ });
2935
2995
  const handleCloseQueueCounts = () => {
2936
2996
  setAnchorEl(null);
2937
2997
  };
@@ -2983,15 +3043,17 @@ function CallControls({ onDataChange }) {
2983
3043
  }
2984
3044
  };
2985
3045
  const handleHoldToggle = () => {
3046
+ var _a3;
2986
3047
  const payload = {
2987
- action: state.isHolding ? "UNHOLD" : "HOLD",
3048
+ action: ((_a3 = state.callData) == null ? void 0 : _a3.hold) === 1 ? "UNHOLD" : "HOLD",
2988
3049
  userId: state.agentId
2989
3050
  };
2990
3051
  holdOrUnHold(END_POINT.HOLD_CALL, payload);
2991
3052
  };
2992
3053
  const handleMuteToggle = () => {
3054
+ var _a3;
2993
3055
  const payload = {
2994
- action: state.isMuted ? "UNMUTE" : "MUTE",
3056
+ action: ((_a3 = state.callData) == null ? void 0 : _a3.mute) === 1 ? "UNMUTE" : "MUTE",
2995
3057
  userId: state.agentId
2996
3058
  };
2997
3059
  muteOrUnMute(END_POINT.MUTE_CALL, payload);
@@ -3397,16 +3459,16 @@ function CallControls({ onDataChange }) {
3397
3459
  children: /* @__PURE__ */ jsx3(SupportAgent2, {})
3398
3460
  }
3399
3461
  ) }),
3400
- /* @__PURE__ */ jsx3(Tooltip2, { title: state.isHolding ? "Resume" : "Hold", children: /* @__PURE__ */ jsx3(
3462
+ /* @__PURE__ */ jsx3(Tooltip2, { title: ((_I = state.callData) == null ? void 0 : _I.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ jsx3(
3401
3463
  Button2,
3402
3464
  {
3403
- variant: state.isHolding && ((_J = (_I = state.callData) == null ? void 0 : _I.status) == null ? void 0 : _J.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
3465
+ variant: ((_J = state.callData) == null ? void 0 : _J.hold) === 1 && ((_L = (_K = state.callData) == null ? void 0 : _K.status) == null ? void 0 : _L.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
3404
3466
  onClick: (e) => {
3405
3467
  e.stopPropagation();
3406
3468
  handleHoldToggle();
3407
3469
  },
3408
- sx: state.isHolding && ((_L = (_K = state.callData) == null ? void 0 : _K.status) == null ? void 0 : _L.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_N = (_M = state.callData) == null ? void 0 : _M.status) == null ? void 0 : _N.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3409
- disabled: ((_P = (_O = state.callData) == null ? void 0 : _O.status) == null ? void 0 : _P.toUpperCase()) !== "ONCALL" && !state.isHolding || holdOrUnHoldLoading,
3470
+ sx: ((_M = state.callData) == null ? void 0 : _M.hold) === 1 && ((_O = (_N = state.callData) == null ? void 0 : _N.status) == null ? void 0 : _O.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_Q = (_P = state.callData) == null ? void 0 : _P.status) == null ? void 0 : _Q.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3471
+ disabled: ((_S = (_R = state.callData) == null ? void 0 : _R.status) == null ? void 0 : _S.toUpperCase()) !== "ONCALL" && ((_T = state.callData) == null ? void 0 : _T.hold) !== 1 || holdOrUnHoldLoading,
3410
3472
  children: holdOrUnHoldLoading ? /* @__PURE__ */ jsx3(
3411
3473
  CircularProgress2,
3412
3474
  {
@@ -3415,19 +3477,19 @@ function CallControls({ onDataChange }) {
3415
3477
  color: theme.palette.primary.main
3416
3478
  }
3417
3479
  }
3418
- ) : state.isHolding ? /* @__PURE__ */ jsx3(PlayArrow2, {}) : /* @__PURE__ */ jsx3(Pause2, {})
3480
+ ) : ((_U = state.callData) == null ? void 0 : _U.hold) === 1 ? /* @__PURE__ */ jsx3(PlayArrow2, {}) : /* @__PURE__ */ jsx3(Pause2, {})
3419
3481
  }
3420
3482
  ) }),
3421
- /* @__PURE__ */ jsx3(Tooltip2, { title: state.isMuted ? "Unmute" : "Mute", children: /* @__PURE__ */ jsx3(
3483
+ /* @__PURE__ */ jsx3(Tooltip2, { title: ((_V = state.callData) == null ? void 0 : _V.mute) === 1 ? "Unmute" : "Mute", children: /* @__PURE__ */ jsx3(
3422
3484
  Button2,
3423
3485
  {
3424
- variant: state.isHolding ? "outlined" : state.isMuted && ((_R = (_Q = state.callData) == null ? void 0 : _Q.status) == null ? void 0 : _R.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
3486
+ variant: state.isHolding ? "outlined" : ((_W = state.callData) == null ? void 0 : _W.mute) === 1 && ((_Y = (_X = state.callData) == null ? void 0 : _X.status) == null ? void 0 : _Y.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
3425
3487
  onClick: (e) => {
3426
3488
  e.stopPropagation();
3427
3489
  handleMuteToggle();
3428
3490
  },
3429
- sx: state.isHolding ? __spreadValues({}, disabled) : state.isMuted && ((_T = (_S = state.callData) == null ? void 0 : _S.status) == null ? void 0 : _T.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_V = (_U = state.callData) == null ? void 0 : _U.status) == null ? void 0 : _V.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3430
- disabled: ((_X = (_W = state.callData) == null ? void 0 : _W.status) == null ? void 0 : _X.toUpperCase()) !== "ONCALL" && !state.isMuted || muteOrUnMuteLoading || state.isHolding,
3491
+ sx: ((_Z = state.callData) == null ? void 0 : _Z.hold) === 1 ? __spreadValues({}, disabled) : ((__ = state.callData) == null ? void 0 : __.mute) === 1 && ((_aa = (_$ = state.callData) == null ? void 0 : _$.status) == null ? void 0 : _aa.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_ca = (_ba = state.callData) == null ? void 0 : _ba.status) == null ? void 0 : _ca.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3492
+ disabled: ((_ea = (_da = state.callData) == null ? void 0 : _da.status) == null ? void 0 : _ea.toUpperCase()) !== "ONCALL" && ((_fa = state.callData) == null ? void 0 : _fa.mute) !== 1 || muteOrUnMuteLoading || ((_ga = state.callData) == null ? void 0 : _ga.hold) === 1,
3431
3493
  children: muteOrUnMuteLoading ? /* @__PURE__ */ jsx3(
3432
3494
  CircularProgress2,
3433
3495
  {
@@ -3436,10 +3498,10 @@ function CallControls({ onDataChange }) {
3436
3498
  color: theme.palette.primary.main
3437
3499
  }
3438
3500
  }
3439
- ) : state.isMuted ? /* @__PURE__ */ jsx3(MicOff2, {}) : /* @__PURE__ */ jsx3(Mic2, {})
3501
+ ) : ((_ha = state.callData) == null ? void 0 : _ha.mute) === 1 ? /* @__PURE__ */ jsx3(MicOff2, {}) : /* @__PURE__ */ jsx3(Mic2, {})
3440
3502
  }
3441
3503
  ) }),
3442
- !((_Y = state.sdkConfig) == null ? void 0 : _Y.disableCallTransferButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "Transfer Call", children: /* @__PURE__ */ jsx3(
3504
+ !((_ia = state.sdkConfig) == null ? void 0 : _ia.disableCallTransferButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "Transfer Call", children: /* @__PURE__ */ jsx3(
3443
3505
  Button2,
3444
3506
  {
3445
3507
  variant: state.openCallTransferDialog ? "contained" : "outlined",
@@ -3450,12 +3512,12 @@ function CallControls({ onDataChange }) {
3450
3512
  sdkStateManager.setOpenCallTransferDialog(true);
3451
3513
  }
3452
3514
  },
3453
- sx: state.openCallTransferDialog ? __spreadValues({}, enabled) : ((__ = (_Z = state.callData) == null ? void 0 : _Z.status) == null ? void 0 : __.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3454
- disabled: ((_aa = (_$ = state.callData) == null ? void 0 : _$.status) == null ? void 0 : _aa.toUpperCase()) !== "ONCALL",
3515
+ sx: state.openCallTransferDialog ? __spreadValues({}, enabled) : ((_ka = (_ja = state.callData) == null ? void 0 : _ja.status) == null ? void 0 : _ka.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3516
+ disabled: ((_ma = (_la = state.callData) == null ? void 0 : _la.status) == null ? void 0 : _ma.toUpperCase()) !== "ONCALL",
3455
3517
  children: /* @__PURE__ */ jsx3(TransferWithinAStation, {})
3456
3518
  }
3457
3519
  ) }),
3458
- !((_ba = state.sdkConfig) == null ? void 0 : _ba.disableConferenceButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "Conference Call", children: /* @__PURE__ */ jsx3(
3520
+ !((_na = state.sdkConfig) == null ? void 0 : _na.disableConferenceButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "Conference Call", children: /* @__PURE__ */ jsx3(
3459
3521
  Button2,
3460
3522
  {
3461
3523
  variant: state.openConferenceDialog ? "contained" : "outlined",
@@ -3466,15 +3528,15 @@ function CallControls({ onDataChange }) {
3466
3528
  sdkStateManager.setOpenConferenceDialog(true);
3467
3529
  }
3468
3530
  },
3469
- sx: state.openConferenceDialog ? __spreadValues({}, enabled) : ((_da = (_ca = state.callData) == null ? void 0 : _ca.status) == null ? void 0 : _da.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3470
- disabled: ((_fa = (_ea = state.callData) == null ? void 0 : _ea.status) == null ? void 0 : _fa.toUpperCase()) !== "ONCALL",
3531
+ sx: state.openConferenceDialog ? __spreadValues({}, enabled) : ((_pa = (_oa = state.callData) == null ? void 0 : _oa.status) == null ? void 0 : _pa.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
3532
+ disabled: ((_ra = (_qa = state.callData) == null ? void 0 : _qa.status) == null ? void 0 : _ra.toUpperCase()) !== "ONCALL",
3471
3533
  children: /* @__PURE__ */ jsx3(Group, {})
3472
3534
  }
3473
3535
  ) }),
3474
- !((_ga = state.sdkConfig) == null ? void 0 : _ga.disableEndCallButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "End Call", children: /* @__PURE__ */ jsx3(
3536
+ !((_sa = state.sdkConfig) == null ? void 0 : _sa.disableEndCallButton) && /* @__PURE__ */ jsx3(Tooltip2, { title: "End Call", children: /* @__PURE__ */ jsx3(
3475
3537
  Button2,
3476
3538
  {
3477
- variant: ((_ia = (_ha = state.callData) == null ? void 0 : _ha.status) == null ? void 0 : _ia.toUpperCase()) === "ONCALL" || ((_ka = (_ja = state.callData) == null ? void 0 : _ja.status) == null ? void 0 : _ka.toUpperCase()) === "RINGING" || ((_ma = (_la = state.callData) == null ? void 0 : _la.status) == null ? void 0 : _ma.toUpperCase()) === "WRAPUP" ? "contained" : "outlined",
3539
+ variant: ((_ua = (_ta = state.callData) == null ? void 0 : _ta.status) == null ? void 0 : _ua.toUpperCase()) === "ONCALL" || ((_wa = (_va = state.callData) == null ? void 0 : _va.status) == null ? void 0 : _wa.toUpperCase()) === "RINGING" || ((_ya = (_xa = state.callData) == null ? void 0 : _xa.status) == null ? void 0 : _ya.toUpperCase()) === "WRAPUP" ? "contained" : "outlined",
3478
3540
  onClick: (e) => {
3479
3541
  var _a3, _b2, _c2, _d2, _e2, _f2;
3480
3542
  if (((_b2 = (_a3 = state.callData) == null ? void 0 : _a3.status) == null ? void 0 : _b2.toUpperCase()) === "ONCALL" || ((_d2 = (_c2 = state.callData) == null ? void 0 : _c2.status) == null ? void 0 : _d2.toUpperCase()) === "RINGING" || ((_f2 = (_e2 = state.callData) == null ? void 0 : _e2.status) == null ? void 0 : _f2.toUpperCase()) === "WRAPUP") {
@@ -3482,7 +3544,7 @@ function CallControls({ onDataChange }) {
3482
3544
  setOpenCallDisposition(true);
3483
3545
  }
3484
3546
  },
3485
- sx: ((_oa = (_na = state.callData) == null ? void 0 : _na.status) == null ? void 0 : _oa.toUpperCase()) === "ONCALL" || ((_qa = (_pa = state.callData) == null ? void 0 : _pa.status) == null ? void 0 : _qa.toUpperCase()) === "RINGING" || ((_sa = (_ra = state.callData) == null ? void 0 : _ra.status) == null ? void 0 : _sa.toUpperCase()) === "WRAPUP" ? __spreadProps(__spreadValues({}, enabled), {
3547
+ sx: ((_Aa = (_za = state.callData) == null ? void 0 : _za.status) == null ? void 0 : _Aa.toUpperCase()) === "ONCALL" || ((_Ca = (_Ba = state.callData) == null ? void 0 : _Ba.status) == null ? void 0 : _Ca.toUpperCase()) === "RINGING" || ((_Ea = (_Da = state.callData) == null ? void 0 : _Da.status) == null ? void 0 : _Ea.toUpperCase()) === "WRAPUP" ? __spreadProps(__spreadValues({}, enabled), {
3486
3548
  borderRight: "1px",
3487
3549
  backgroundColor: "error.main",
3488
3550
  minWidth: "60px !important",
@@ -3501,7 +3563,7 @@ function CallControls({ onDataChange }) {
3501
3563
  }) : __spreadProps(__spreadValues({}, disabled), {
3502
3564
  minWidth: "60px !important"
3503
3565
  }),
3504
- disabled: ((_ua = (_ta = state.callData) == null ? void 0 : _ta.status) == null ? void 0 : _ua.toUpperCase()) !== "ONCALL" && ((_wa = (_va = state.callData) == null ? void 0 : _va.status) == null ? void 0 : _wa.toUpperCase()) !== "RINGING" && ((_ya = (_xa = state.callData) == null ? void 0 : _xa.status) == null ? void 0 : _ya.toUpperCase()) !== "WRAPUP" || endCallLoading,
3566
+ disabled: ((_Ga = (_Fa = state.callData) == null ? void 0 : _Fa.status) == null ? void 0 : _Ga.toUpperCase()) !== "ONCALL" && ((_Ia = (_Ha = state.callData) == null ? void 0 : _Ha.status) == null ? void 0 : _Ia.toUpperCase()) !== "RINGING" && ((_Ka = (_Ja = state.callData) == null ? void 0 : _Ja.status) == null ? void 0 : _Ka.toUpperCase()) !== "WRAPUP" || endCallLoading,
3505
3567
  children: endCallLoading ? /* @__PURE__ */ jsx3(
3506
3568
  CircularProgress2,
3507
3569
  {
@@ -3541,7 +3603,7 @@ function CallControls({ onDataChange }) {
3541
3603
  transition: theme.transitions.create(["box-shadow", "transform"], {
3542
3604
  duration: theme.transitions.duration.short
3543
3605
  }),
3544
- visibility: showIframe && !((_za = state.sdkConfig) == null ? void 0 : _za.disableSoftPhone) ? "visible" : "hidden",
3606
+ visibility: showIframe && !((_La = state.sdkConfig) == null ? void 0 : _La.disableSoftPhone) ? "visible" : "hidden",
3545
3607
  userSelect: "none"
3546
3608
  },
3547
3609
  children: [
@@ -3575,7 +3637,7 @@ function CallControls({ onDataChange }) {
3575
3637
  /* @__PURE__ */ jsx3(Box2, { children: /* @__PURE__ */ jsx3(
3576
3638
  "iframe",
3577
3639
  {
3578
- src: `https://${IP}/ConVoxCCS/iframe?agent_id=${state.agentId}&process_id=${(_Aa = state.process) == null ? void 0 : _Aa.process_id}`,
3640
+ src: `https://${IP}/ConVoxCCS/iframe?agent_id=${state.agentId}&process_id=${(_Ma = state.process) == null ? void 0 : _Ma.process_id}`,
3579
3641
  height: 380,
3580
3642
  width: 420,
3581
3643
  allow: "camera; microphone; autoplay",