PageSourceSearch

https://app.prnewswire.com/static/js/3667.4f8c13ff.chunk.js

js prnewswire.com collected 2026-09-24 07:34:02 UTC 45,307 bytes, 322 lines download raw bytes

1"use strict";(globalThis.webpackChunkomc_ui_2_0||=[]).push([[3667],{37634(e,a,t){var l,n=t(9950);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},s.apply(null,arguments)}function i(e,a){let{title:t,titleId:i,...o}=e;return n.createElement("svg",s({width:21,height:21,viewBox:"0 0 21 21",fill:"current",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":i},o),t?n.createElement("title",{id:i},t):null,l||(l=n.createElement("path",{d:"M15.1134 5.72844L8.52344 12.3184L4.93344 8.73844L3.52344 10.1484L8.52344 15.1484L16.5234 7.14844L15.1134 5.72844ZM10.5234 0.148438C5.00344 0.148438 0.523438 4.62844 0.523438 10.1484C0.523438 15.6684 5.00344 20.1484 10.5234 20.1484C16.0434 20.1484 20.5234 15.6684 20.5234 10.1484C20.5234 4.62844 16.0434 0.148438 10.5234 0.148438ZM10.5234 18.1484C6.10344 18.1484 2.52344 14.5684 2.52344 10.1484C2.52344 5.72844 6.10344 2.14844 10.5234 2.14844C14.9434 2.14844 18.5234 5.72844 18.5234 10.1484C18.5234 14.5684 14.9434 18.1484 10.5234 18.1484Z"})))}const o=n.forwardRef(i);t.p;t.d(a,["h",0,o])},73667(e,a,t){t.r(a),t.d(a,{default:()=>$e});var l=t(9950),n=t(48661),s=t(71316),i=t(42087),o=t(92526),r=t(78503),c=t(9372),d=t(3620),m=t(46931),g=t(44414);const x=()=>{const[e]=(0,n.B)();return(0,g.jsxs)("section",{className:"d-flex flex-wrap justify-content-between",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"text-gray-90",children:e("manageContacts:manageContactsTitle","Manage contacts")}),(0,g.jsx)("p",{className:"body-text text-gray-80 mb-0",children:e("manageContacts:description","Add, update, or deactivate contacts on your account.")})]}),(0,g.jsx)(m.A,{})]})};var h=t(35657),p=t(41397),v=t(72004);const u=[{heading:"Name",value:"name",isSortable:!0,isSortDesc:!1,locizeKey:"colName",width:"max-content"},{heading:"Email",value:"email",isSortable:!1,isSortDesc:!1,locizeKey:"colEmail",width:""},{heading:"Phone",value:"phone",isSortable:!1,isSortDesc:!1,locizeKey:"colPhone",width:""},{heading:"Authorized Sender",value:"authorized_sender",isSortable:!1,isSortDesc:!1,locizeKey:"colAuthorizedSender",width:""},{heading:"Actions",value:"actions",isSortable:!1,isSortDesc:!1,locizeKey:"colTools",width:""}],b=[{name:"Contacts",locizeKey:"tabContacts"},{name:"Billing details",locizeKey:"tabBillingDetails"}
1],C={Pending:{value:"- Pending",locizeKey:"statusPending"},Active:{value:" ",locizeKey:""}},j={billingAddress:!0,billingCity:!0,billingState:!0,billingZipCode:!0,billingCountry:!0};var y=t(28872),f=t(4801);const N=e=>{let{selectedTab:a,handleTabChange:t}=e;const[i]=(0,n.B)(),{anyContactHasPendingStatus:o,fetchingContacts:r,toggleAddUpdateForm:c,setCurrentFormMode:d}=(0,l.useContext)(y.b),m=e=>{var a;s.x0.includes(e.code)&&(e.preventDefault(),null===(a=e.target)||void 0===a||a.click())},x=()=>{c(),d(f._.ADD)};return(0,g.jsxs)("div",{className:"d-flex justify-content-between align-items-center mt-4 flex-wrap","data-testid":"tabs-wrapper",children:[(0,g.jsxs)("div",{className:"d-xs-flex flex-column gap-2",children:[(0,g.jsx)(h.ru,{"aria-label":"Navigation tabs",className:"border-b",children:b.map(e=>{let{name:l,locizeKey:n}=e;const s=i(`manageContacts:${n}`,l),o=a===l;return(0,g.jsx)(h.ru.Item,{className:(0,v.A)("navigation-tab-item",r?"pe-none":""),...o?{active:!0}:{},onClick:()=>t(l),onKeyDown:m,children:(0,g.jsx)("span",{className:(0,v.A)("body-16 text-gray-80 whitespace-no-wrap omc-px-1.5 omc-py-3 outline-none inline-block",o&&"bold"),role:"tab","data-testid":`tab-${l}`,tabIndex:0,children:s})},s)})}),"contacts"===a.toLowerCase()&&o&&(0,g.jsx)("span",{className:"body-14 d-md-none omc-mr-[18px]",children:(0,g.jsxs)(g.Fragment,{children:[i("manageContacts:status","Status"),": \xa0",(0,g.jsx)("span",{className:"body-14 bold text-orange-color",children:i("manageContacts:statusUpdatePending","Updates Pending")})]})})]}),"contacts"===a.toLowerCase()&&(0,g.jsxs)("div",{className:"ms-sm-auto d-flex align-items-center",children:[(0,g.jsx)("span",{className:"body-14 d-none d-md-block omc-mr-[18px]",children:o&&(0,g.jsxs)(g.Fragment,{children:[i("manageContacts:status","Status"),": \xa0",(0,g.jsx)("span",{className:"body-14 bold text-orange-color",children:i("manageContacts:statusUpdatePending","Updates Pending")})]})}),(0,g.jsx)(h.$n,{level:"primary",size:"md",className:"d-none d-md-block",onClick:x,children:i("manageContacts:btnAddContact","Add Contact")}),(0,g.jsx)(h.$n,{level:"primary",size:"sm",className:"d-md-none",disabled:!0,onClick:x,children:(0,g.jsx)(h.In,{name:"add"})})]})]})},w=(0,l.memo)(N);var A,k=t(5637),E=t(22776),S=t(14491),D=t(99422);function M(){return M=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},M.apply(null,arguments)}function B(e,a){let{title:t,titleId:n,...s}=e;return l.createElement("svg",M({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":n},s),t?l.createElement("title",{id:n},t):null,A||(A=l.createElement("path",{d:"M3 2H19.005C20.107 2 21 2.898 21 3.99V20.01C21 21.109 20.107 22 19.005 22H3V2ZM7 4H5V20H7V4ZM9 20H19V4H9V20ZM11 16C11 15.2044 11.3161 14.4413 11.8787 13.8787C12.4413 13.3161 13.2044 13 14 13C14.7956 13 15.5587 13.3161 16.1213 13.8787C16.6839 14.4413 17 15.2044 17 16H11ZM14 12C13.4696 12 12.9609 11.7893 12.5858 11.4142C12.2107 11.0391 12 10.5304 12 10C12 9.46957 12.2107 8.96086 12.5858 8.58579C12.9609 8.21071 13.4696 8 14 8C14.5304 8 15.0391 8.21071 15.4142 8.58579C15.7893 8.96086 16 9.46957 16 10C16 10.5304 15.7893 11.0391 15.4142 11.4142C15.0391 11.7893 14.5304 12 14 12ZM22 6H24V10H22V6ZM22 12H24V16H22V12Z",fill:"#2078CA"})))}const I=l.forwardRef(B),$=(t.p,S.Ay.div`
2  background-color: var(--gray-10-color);
3
4  height: 100%;
5  /* min-height: 684px; */
6
7  margin-top: 24px;
8  padding: 10px;
9
10  .rvr-active__8MI {
11    border-bottom: 2px solid var(--primary-color-blue) !important;
12  }
13
14  .billing-details-container {
15    margin: 32px 48px;
16
17    hr {
18      margin-top: 16px;
19      margin-bottom: 24px;
20    }
21
22    .gap-16 {
23      gap: 16px;
24    }
25
26    .cursor-pointer {
27      cursor: pointer;
28    }
29
30    .update-info-wrapper {
31      .status {
32        border-bottom: 1px solid var(--gray-20-color);
33      }
34    }
35
36    .reassign-wrapper {
37      padding: 16px;
38    }
39
40    .view-form-wrapper {
41      display: flex;
42      flex-direction: column;
43      padding: 16px;
44      margin-top: 20px;
45      .gap-24 {
46        gap: 24px;
47      }
48    }
49
50    .edit-form-wrapper {
51      gap: 16px;
52      padding: 16px;
53      margin-top: 20px;
54
55      .spinner {
56        height: 20px !important;
57        width: 20px !important;
58      }
59    }
60  }
61`),L=S.Ay.div`
62  table {
63    width: 100%;
64
65    thead {
66      tr {
67        border: 1px solid var(--gray-20-color);
68
69        th {
70          border-bottom: 1px;
71          padding: 16px 24px 16px 8px;
72
73          span {
74            letter-spacing: 0.84px;
75          }
76
77          &:nth-child(4) {
78            span {
79              display: flex;
80              width: max-content;
81            }
82          }
83          &:nth-child(1) {
84            padding-right: 4px;
85            padding-bottom: 18px;
86          }
87          &:nth-child(2) {
88            padding-left: 4px;
89          }
90
91          &:last-child {
92            text-align: center;
93          }
94        }
95      }
96    }
97
98    tbody {
99      tr {
100        border: 1px solid var(--gray-20-color);
101        vertical-align: middle;
102        &:hover {
103          cursor: pointer;
104          td {
105            background-color: var(--gray-10-color);
106          }
107        }
108
109        td {
110          line-height: 24px !important;
111          padding: 16px 32px 16px 8px;
112          max-width: 220px;
113          &:nth-child(1) {
114            padding-right: 4px;
115            padding-bottom: 22px;
116          }
117          &:nth-child(2) {
118            padding-left: 4px;
119          }
120
121          &:nth-child(4) {
122            span {
123              display: flex;
124              justify-content: center;
125              width: 135px;
126            }
127          }
128        }
129
130        .selected-row {
131          background: var(--primary-color-highlight) !important;
132        }
133
134        .pointer-event-none {
135          pointer-events: none;
136        }
137
138        .drop-down {
139          z-index: 1;
140        }
141
142        .rvr-as-text__3E_:focus-visible {
143          outline: 5px auto var(--primary-color-blue) !important;
144          box-shadow: none;
145        }
146
147        &[aria-disabled='true'] {
148          td {
149            background-color: var(--gray-10-color);
150          }
151          cursor: default;
152        }
153      }
154    }
155  }
156  .actions-icon {
157    text-align: center;
158  }
159  .deactivate-selected-contacts {
160    display: flex;
161    align-items: center;
162    justify-content: end;
163    .selected-contacts {
164      font-size: 14px;
165      font-weight: 700;
166      color: var(--primary-color-focus);
167    }
168    .deactivate-btn {
169      margin-left: 13px;
170      margin-right: 16px;
171      letter-spacing: 0.07em;
172      color: var(--primary-color-blue);
173      border-color: var(--primary-color-blue);
174      &:hover {
175        color: var(--white-color);
176      }
177    }
178  }
179
180  .hovered-row:hover {
181    background-color: var(--gray-10-color);
182  }
183
184  .cursor-pointer {
185    cursor: pointer;
186  }
187  .rvr-EasyDropdown__20R {
188    display: inline;
189  }
190  .rvr-Menu__31t {
191    width: 100px;
192  }
193`,P=(0,S.Ay)(E.A)`
194  position: relative;
195  top: 2px;
196  .form-check-input {
197    margin: 0;
198  }
199`,z=(0,S.Ay)(I)`
200  width: 20px;
201  height: 20px;
202`,F=(0,S.Ay)(k.A)`
203  .modal-dialog {
204    max-width: 614px;
205  }
206
207  .header {
208    border-bottom-color: var(--gray-20-color);
209  }
210
211  .body {
212    padding: 16px;
213
214    .select-billing-contact-wrap {
215      margin-top: 28px;
216      position: relative;
217
218      .select-wrap {
219        border: 1px solid var(--gray-60-color);
220        border-radius: 4px;
221
222        .dropdown-toggle::after {
223          display: none;
224        }
225        .dropdown-menu {
226          background-color: var(--white-color);
227          width: 100%;
228          box-shadow: 0px 5px 10px 0px var(--drop-shadow-50);
229          max-height: 170px !important;
230
231          .dropdown-item {
232            color: var(--gray-90-color) !important;
233            background-color: var(--white-color) !important;
234            border-bottom: 1px solid var(--gray-20-color);
235            padding: 8px 16px;
236            &:hover {
237              background-color: var(--gray-20-color) !important;
238            }
239          }
240        }
241        input {
242          width: 100%;
243          padding: 8px;
244          color: var(--gray-90-color);
245          font-size: 14px;
246          font-weight: 400;
247          line-height: 24px;
248          white-space: nowrap;
249          overflow: hidden;
250          text-overflow: ellipsis;
251          --webkit-line-clamp: 2;
252
253          &:focus {
254            ${D.Ep}
255          }
256        }
257      }
258      &::after {
259        content: '';
260        position: absolute;
261        top: 45px;
262        right: 10px;
263        border-left: 6px solid transparent;
264        border-right: 6px solid transparent;
265        border-top: 6px solid var(--gray-80-color);
266        pointer-events: initial;
267      }
268    }
269  }
270
271  .spinner {
272    height: 20px !important;
273    width: 20px !important;
274  }
275`;var T=t(1093);const Z=()=>{var e;const[a]=(0,n.B)(),{handleDeactivateContacts:t,selectAll:s,handleCheckDeactivateContactAll:i,anyContactHasPendingStatus:o,contactsList:r,selectedDeactivateIdAll:c,checkedDeactivateContact:d,fetchingContacts:m}=(0,l.useContext)(y.b),[x,p]=(0,l.useState)(null!==(e=null===d||void 0===d?void 0:d.length)&&void 0!==e?e:0),[b,C]=(0,l.useState)(!1),j=1===r.length&&r.some(e=>e.isBillingContact),f=r.filter(e=>e.isBillingContact),N=r.filter(e=>"active"===e.status.toLowerCase()),w=r.filter(e=>"pending"===e.status.toLowerCase());return(0,l.useEffect)(()=>{(1===N.length&&1===f.length&&w.length===r.length-1||j)&&C(!0)},[f,N,w,r]),(0,l.useEffect)(()=>{p(null===d||void 0===d?void 0:d.length)},[d]),(0,g.jsxs)("thead",{children:[x>0?(0,g.jsx)("tr",{children:(0,g.jsx)("th",{colSpan:6,className:"pe-0",children:(0,g.jsxs)("div",{className:"deactivate-selected-contacts",children:[(0,g.jsxs)("span",{className:"selected-contacts",children:[x," ",a("manageContacts:contactsSelected","contacts selected")]})," ",(0,g.jsx)(h.$n,{disabled:m,className:"deactivate-btn body-14",type:"secondary",size:"md",onClick:()=>t(c),children:a("manageContacts:deactivateContacts",{plural:"s"})})]})})}):null,(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:(0,g.jsx)(P,{children:(0,g.jsx)(E.A.Check,{type:"checkbox",disabled:b||m,checked:s,onKeyUp:e=>{["Space"].includes(e.code)&&i(e.currentTarget.checked)},ref:e=>{e&&o?e.indeterminate=s:e&&(e.checked=s)},onChange:e=>{(e=>{i(e.currentTarget.checked)})(e)},className:(0,v.A)(b||m?"pointer-event-none":"","selection-list-item")})})}),u.map(e=>(0,g.jsx)("th",{children:(0,g.jsx)("span",{className:(0,v.A)("body-text-small text-gray-90  text-uppercase",e.width?e.width:""),children:e.isSortable?(0,g.jsxs)("span",{className:"d-flex align-items-center",children:[a(`manageContacts:${e.locizeKey}`,e.heading),(0,g.jsx)("span",{className:"ms-3"})]}):a(`manageContacts:${e.locizeKey}`,e.heading)})},`header-${e.value}`))]})]})};var U=t(5418),O=t(88957);const V=()=>(0,g.jsx)("tbody",{children:(0,g.jsx)("tr",{children:(0,g.jsx)("td",{colSpan:5,children:(0,g.jsx)(O.eO,{viewBox:"0 0 620 300"})})})});var H,R,_=t(37634);function K(){return K=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},K.apply(null,arguments)}function q(e,a){let{title:t,titleId:n,...s}=e;return l.createElement("svg",K({width:88,height:56,viewBox:"0 0 88 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":n},s),t?l.createElement("title",{id:n},t):null,H||(H=l.createElement("mask",{id:"path-1-inside-1_1900_7869",fill:"white"},l.createElement("path",{d:"M0 0H88V56H0V0Z"}))),R||(R=l.createElement("path",{d:"M44 24C45.1 24 46 23.1 46 22C46 20.9 45.1 20 44 20C42.9 20 42 20.9 42 22C42 23.1 42.9 24 44 24ZM44 26C42.9 26 42 26.9 42 28C42 29.1 42.9 30 44 30C45.1 30 46 29.1 46 28C46 26.9 45.1 26 44 26ZM44 32C42.9 32 42 32.9 42 34C42 35.1 42.9 36 44 36C45.1 36 46 35.1 46 34C46 32.9 45.1 32 44 32Z",fill:"#677078"})))}const G=l.forwardRef(q);t.p;var W=t(99442),J=t(38824);const Q=e=>{var a,t,o,c;const{globalContactId:d,firstName:m,lastName:x,status:p,roles:u,emailAddress:b,isBillingContact:j,phoneNumber:f}=e,N=(0,l.useRef)(null),[w]=(0,n.B)(),A=(0,i.GV)(r.H4),{contactsList:k,handleEditContact:S,handleDeactivateContact:D,handleCheckDeactivateContact:M,handleCheckDeactivateContactAll:B,checkedDeactivateContact:I}=(0,l.useContext)(y.b),[$,L]=(0,l.useState)(!1),F=`${m} ${x}`,T=(0,l.useMemo)(()=>"pending"===p.toLowerCase(),[p]),Z=(0,l.useMemo)(()=>{var e;return null===(e=(0,W.E)(u))||void 0===e?void 0:e.includes(s.$2.AUTHORIZED_SENDER.toUpperCase())},[u]),U=(0,l.useMemo)(()=>A===b,[A,b]),O=(0,l.useMemo)(()=>j||1===k.length||U,[j,k,U]),V=(0,l.useMemo)(()=>I.includes(d),[I,d]);return(0,l.useEffect)(()=>{const e=e=>{N.current&&!N.current.contains(e.target)&&L(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[N]),(0,g.jsxs)("tr",{className:(0,v.A)(V?"selected-row":"","body-14 text-gray-90"),"aria-disabled":T,children:[(0,g.jsx)("td",{className:(0,v.A)(V?"selected-row":"",O?"pointer-event-none":""),children:(0,g.jsx)(P,{children:(0,g.jsx)(E.A.Check,{type:"checkbox",className:(0,v.A)("selection-list-item"),disabled:T||j||U,onChange:()=>{j||M(e)},checked:V})})}),(0,g.jsx)("td",{className:(0,v.A)(V?"selected-row":"","text-truncate"),children:(0,g.jsx)(J.A,{content:(0,g.jsxs)("span",{className:"d-flex align-items-center flex-wrap text-break",children:[j&&(0,g.jsx)(z,{className:"omc-ml-0 omc-mr-1.5"}),(0,g.jsx)("span",{children:F}),(0,g.jsx)("span",{children:w(`manageContacts:${null===(a=C[p])||void 0===a?void 0:a.locizeKey}`,null===(t=C[p])||void 0===t?void 0:t.value)})]}),children:(0,g.jsxs)("span",{className:"d-flex align-items-center",children:[j&&(0,g.jsx)(z,{className:"omc-ml-0 omc-mr-1.5"}),(0,g.jsx)("span",{className:"omc-max-w-md omc-truncate",children:F}),(0,g.jsx)("span",{className:"text-orange-color omc-ml-1",children:w(`manageContacts:${null===(o=C[p])||void 0===o?void 0:o.locizeKey}`,null===(c=C[p])||void 0===c?void 0:c.value)})]})})}),(0,g.jsx)("td",{className:(0,v.A)(V?"selected-row":"","text-truncate"),children:(0,g.jsx)(J.A,{content:(0,g.jsx)("span",{children:b}),children:(0,g.jsx)("span",{children:b})})}),(0,g.jsx)("td",{className:(0,v.A)(V?"selected-row":"","text-truncate"),children:f}),(0,g.jsx)("td",{className:(0,v.A)(V?"selected-row":"","actions-icon"),children:(0,g.jsx)("span",{children:(0,g.jsx)(_.h,{className:(0,v.A)(Z?"fill-success":"fill-gray-40")})})}),(0,g.jsxs)("td",{className:(0,v.A)(V?"selected-row":"","py-2 actions-icon"),children:[(0,g.jsx)("div",{children:(0,g.jsx)(G,{ref:N,tabIndex:T?-1:0,className:(0,v.A)(T&&"pointer-event-none",T||0!==I.length?"":"cursor-pointer","p-0"),onClick:()=>{B(!1),L(!$)},onKeyDown:e=>{s.x0.includes(e.code)&&(e.preventDefault(),L(!$))}})}),T?null:(0,g.jsx)(h.UO,{disabled:!1,isOpen:$,className:"drop-down",menuItems:[{label:w("manageContacts:editContact","Edit Contact"),tabIndex:0,content:w("manageContacts:editContact","Edit Contact"),onClick:()=>S(e),className:"edit-contact"},{label:w("manageContacts:deactivate","Deactivate"),tabIndex:O?-1:0,content:w("manageContacts:deactivate","Deactivate"),onClick:()=>D(e),disabled:O}],menuProps:{position:"bottomLeft"}})]})]},`${d}`)}
275,X=(0,l.memo)(Q),Y=()=>{const{fetchingContacts:e,contactsList:a}=(0,U.y)(y.b);return e?(0,g.jsx)(V,{}):(0,g.jsx)("tbody",{children:null===a||void 0===a?void 0:a.map(e=>{var a;return(0,g.jsx)(X,{...e},null!==(a=e.globalContactId)&&void 0!==a?a:e.emailAddress)})})},ee=()=>(0,g.jsx)(L,{children:(0,g.jsxs)(T.A,{className:"table",responsive:!0,children:[(0,g.jsx)(Z,{}),(0,g.jsx)(Y,{})]})});var ae=t(86791),te=t.n(ae),le=t(88135),ne=t(56943);const se=(e,a)=>(0,g.jsxs)("div",{className:"d-flex flex-column body-text-small text-gray-80",children:[(0,g.jsx)("label",{className:"mb-sm-0 form-label",children:e}),(0,g.jsx)("span",{className:"body-16 text-gray-90 text-break",children:a})]}),ie=()=>{const[e]=(0,n.B)(),{isImpersonated:a}=(0,i.GV)(r.Qn),{accountDetails:t,isEditMode:s,toggleEditMode:o}=(0,U.y)(y.v),{primaryBillingContactDetails:c,contactsList:d}=(0,U.y)(y.b),m=(0,l.useMemo)(()=>"inactive"===((null===t||void 0===t?void 0:t.status)||"").toLowerCase(),[null===c||void 0===c?void 0:c.status,null===t||void 0===t?void 0:t.status]),x=()=>(0,g.jsxs)(h.$n,{size:"sm",level:"link",disabled:m||a,onClick:o,children:[(0,g.jsx)(h.In,{name:"edit",className:"me-2"}),e("manageContacts:edit","Edit")]});return(0,g.jsxs)("div",{className:"view-form-wrapper border-1-gray-40 border-radius-8",children:[m?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("span",{className:"body-14 text-gray-80","data-testid":"status-pending-text",children:[e("manageContacts:status","Status"),":"," ",(0,g.jsx)("span",{className:"body-14 bold text-orange-color",children:e("manageContacts:statusUpdatePending","Updates Pending")})]}),(0,g.jsxs)("div",{className:"d-flex align-items-center",children:[(0,g.jsx)("hr",{className:"w-100"}),!s&&x()]})]}):null,(0,g.jsxs)("div",{className:"d-flex flex-column gap-24",children:[(0,g.jsx)("div",{className:"row",children:(0,g.jsx)("div",{className:"col text-capitalize",children:(0,g.jsxs)("div",{className:"d-flex flex-column body-text-small text-gray-80",children:[(0,g.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,g.jsx)("label",{className:"mb-sm-0 form-label",children:e("manageContacts:billingAddressLabel","Billing Address")}),s||m?null:x()]}),(0,g.jsx)("span",{className:"body-16 text-gray-90 text-break",children:null===t||void 0===t?void 0:t.billingAddress})]})})}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-4 mt-sm-2 mt-md-0 text-capitalize",children:se(e("manageContacts:billingCityLabel","Billing City"),null===t||void 0===t?void 0:t.billingCity)}),(0,g.jsx)("div",{className:"col-md-4 mt-sm-2 mt-md-0 text-capitalize",children:se(e("manageContacts:billingStateLabel","Billing State"),null===t||void 0===t?void 0:t.billingState)})]}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-4 mt-sm-2 mt-md-0 text-capitalize",children:se(e("manageContacts:billingZipCodeLabel","Billing Zip Code"),null===t||void 0===t?void 0:t.billingZipCode)}),(0,g.jsx)("div",{className:"col-md-4 mt-sm-2 mt-md-0 text-capitalize",children:se(e("manageContacts:billingCountryLabel","Billing Country"),null===t||void 0===t?void 0:t.billingCountry)})]})]})]})},oe=(0,l.memo)(ie);t(30776);var re=t(39926);const ce=e=>{const{setFormData:a}=(0,U.y)(y.v);return(0,g.jsx)(re.A,{...e,onInputChange:(e,t)=>
275{a(a=>({...a,[e]:t}))}})},de=(0,l.memo)(ce);var me=t(49125);const ge=()=>{const[e]=(0,n.B)(),{toggleEditMode:a,formData:t,updatingBillingDetails:o,updateBillingDetails:r,setIsEditMode:c,setAccountDetails:d}=(0,U.y)(y.v),[m,x]=(0,l.useState)(!0),[p,v]=(0,l.useState)(j);return(0,i.w5)(()=>{m&&x(!1)},[JSON.stringify(t)]),(0,g.jsxs)("div",{className:"edit-form-wrapper d-flex flex-column border-1-gray-40 border-radius-8",children:[(0,g.jsx)("div",{className:"row",children:(0,g.jsx)("div",{className:"col d-flex flex-column",children:(0,g.jsx)(de,{label:e("manageContacts:billingAddressLabel","Billing Address"),placeholder:e("manageContacts:billingAddressPlaceholder","Enter Billing Address"),name:"billingAddress",value:null===t||void 0===t?void 0:t.billingAddress,required:!0,maxLength:s.Fx,"aria-invalid":`${!(null!==p&&void 0!==p&&p.billingAddress)}`,errorMessage:e("manageContacts:billingAddressErrorMessage","Please enter a valid billing address.")})})}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(de,{label:e("manageContacts:billingCityLabel","Billing city"),placeholder:e("manageContacts:billingCityPlaceholder","Enter Billing city"),name:"billingCity",value:null===t||void 0===t?void 0:t.billingCity,required:!0,maxLength:s.mU,"aria-invalid":`${!(null!==p&&void 0!==p&&p.billingCity)}`,errorMessage:e("manageContacts:billingCityErrorMessage","Please enter billing city")})}),(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(de,{label:e("manageContacts:billingStateLabel","Billing state"),placeholder:e("manageContacts:billingStatePlaceholder","Enter Billing state"),name:"billingState",value:null===t||void 0===t?void 0:t.billingState,required:!0,maxLength:s.my,"aria-invalid":`${!(null!==p&&void 0!==p&&p.billingState)}`,errorMessage:e("manageContacts:billingStateErrorMessage","Please enter billing state.")})})]}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(de,{"data-testid":"Billing zip code",label:e("manageContacts:billingZipCodeLabel","Billing zip code"),placeholder:e("manageContacts:billingZipCodePlaceholder","Enter zip code"),name:"billingZipCode",value:null===t||void 0===t?void 0:t.billingZipCode,required:!0,maxLength:s.IM,"aria-invalid":`${!(null!==p&&void 0!==p&&p.billingZipCode)}`,errorMessage:e("manageContacts:billingZipCodeErrorMessage","Please enter billing zip code")})}),(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(de,{label:e("manageContacts:billingCountryLabel","Billing country"),placeholder:e("manageContacts:billingCountryPlaceholder","Enter Billing country"),name:"billingCountry",value:null===t||void 0===t?void 0:t.billingCountry,required:!0,maxLength:s.r1,"aria-invalid":`${!(null!==p&&void 0!==p&&p.billingCountry)}`,errorMessage:e("manageContacts:billingCountryErrorMessage","Please enter billing state.")})})]}),(0,g.jsx)("div",{children:(0,g.jsxs)("div",{className:"float-end d-flex align-items-center gap-1 mb-1",children:[(0,g.jsx)(h.$n,{level:"tertiary",onClick:()=>!o&&a(),children:e("manageContacts:billingCancelButton","Cancel")}),(0,g.jsxs)(h.$n,{level:"primary",disabled:m,onClick:async()=>{if(o)return;const e=(()=>{var e,a,l,n,s;const{billingAddress:i,billingCity:o,billingState:r,billingZipCode:c,billingCountry:d}=t;return{billingAddress:(null===i||void 0===i||null===(e=i.trim())||void 0===e?void 0:e.length)>0,billingCity:(null===o||void 0===o||null===(a=o.trim())||void 0===a?void 0:a.length)>0,billingState:(null===r||void 0===r||null===(l=r.trim())||void 0===l?void 0:l.length)>0,billingZipCode:(null===c||void 0===c||null===(n=c.trim())||void 0===n?void 0:n.length)>0,billingCountry:(null===d||void 0===d||null===(s=d.trim())||void 0===s?void 0:s.length)>0}})();v(e);if(Object.keys(e).every(a=>e[a]))try{await r(t),c(!1),d({...t,status:"InActive"})}catch(a){}},children:[o&&(0,g.jsx)(me.h,{className:"spinner omc-mr-1.5"}),o?e("manageContacts:billingSavingButton","Saving..."):e("manageContacts:billingSaveChangesButton","Save Changes")]})]})})]})},xe=(0,l.memo)(ge),he=()=>{const[e]=(0,n.B)(),{isImpersonated:a}=(0,i.GV)(r.Qn),{primaryBillingContactDetails:t,contactsList:s}=(0,U.y)(y.b),{accountDetails:o,updatingBillingDetails:c,setOpenReAssignModal:d}=(0,U.y)(y.v),m=(0,l.useMemo)(()=>{var e;return"pending"===(null===t||void 0===t||null===(e=t.status)||void 0===e?void 0:e.toLowerCase())},[null===t||void 0===t?void 0:t.status,null===o||void 0===o?void 0:o.status]),x=(0,l.useMemo)(()=>s.filter(e=>!e.isBillingContact).length>1,[s]),p=c||m||a,v=()=>d(!0),u=()=>(0,g.jsxs)("div",{children:[(0,g.jsxs)(h.$n,{size:"sm",level:"link",className:"d-none d-md-block text-nowrap omc-ml-1.5",disabled:p,onClick:v,children:[(0,g.jsx)(h.In,{name:"edit",className:"me-2"})," ",e("manageContacts:reassignContact","Reassign contact")]}),(0,g.jsx)(h.$n,{size:"sm",level:"link",className:"d-md-none omc-ml-1.5",disabled:p,onClick:v,children:(0,g.jsx)(h.In,{name:"edit",className:"me-2"})})]});return(0,g.jsxs)("div",{className:"reassign-wrapper d-flex flex-column border-1-gray-40 border-radius-8",children:[m?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("span",{className:"body-14 text-gray-80","data-testid":"status-pending-text",children:[e("manageContacts:status","Status"),":"," ",(0,g.jsx)("span",{className:"body-14 bold text-orange-color",children:e("manageContacts:statusUpdatePending","Updates Pending")})]}),(0,g.jsxs)("div",{className:"d-flex align-items-center mt-",children:[(0,g.jsx)("hr",{className:"w-100"}),u()]})]}):null,(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"d-flex align-items-baseline justify-content-between",children:[(0,g.jsxs)("div",{className:"d-flex flex-column",children:[(0,g.jsx)("span",{className:"body-text-small text-gray-80",children:e("manageContacts:billingPrimaryBillingContact","Primary billing Contact")}),(0,g.jsxs)("span",{className:"body-14",children:[null===t||void 0===t?void 0:t.firstName,"\xa0",null===t||void 0===t?void 0:t.lastName]})]}),m?null:u()]}),x?null:(0,g.jsxs)("span",{className:"body-14",children:[e("manageContacts:needToReassignBillingContact","Need to reassign billing contact? Please")," ",(0,g.jsx)(h.$n,{level:"text",className:"text-primary-blue-light cursor-pointer p-0",tabIndex:0,children:e("manageContacts:addNewUser","add a new user")}),"\xa0",e("manageContacts:toTheAccountFirst","to the account first.")]})]})]})};var pe=t(51165);const ve=()=>{const[e]=(0,n.B)(),{contactsList:a,primaryBillingContactDetails:t,setContactsList:s}=(0,U.y)(y.b),{openReassignContactModal:o,reassigningContact:r,reassignPrimaryBillingContact:c,setOpenReAssignModal:d}=(0,U.y)(y.v),[m,x]=(0,l.useState)(!1),[p,v]=(0,l.useState)([]),u=(0,l.useMemo)(()=>a.filter(e=>{const{globalContactId:a,status:l}=e;return a!==(null===t||void 0===t?void 0:t.globalContactId)&&"active"===(l||"").toLowerCase()}).sort((e,a)=>e.firstName.localeCompare(a.firstName)),[a]),b=()=>{r||d(!1)};return(0,i.w5)(()=>{x(p.length>0)},[p]),o?(0,g.jsxs)(F,{show:o,onClose:b,centered:!0,"aria-labelledby":"reassign-contact-title",children:[(0,g.jsxs)(k.A.Header,{className:"header bg-gray-10 d-flex align-items-center justify-content-between",children:[(0,g.jsx)("h2",{id:"reassign-contact-title",className:"body-16 omc-m-0",children:e("manageContacts:reassignEditContact","Edit Primary Billing Contact")}),(0,g.jsx)(h.$n,{level:"tertiary",size:"sm",className:"border-0 bg-gray-10 p-0","aria-label":"close",onClick:b,children:(0,g.jsx)(h.In,{name:"close",className:"fill-gray-80"})})]}),(0,g.jsxs)(k.A.Body,{className:"body d-flex flex-column",children:[(0,g.jsx)("h3",{className:"text-gray-90 mb-0",children:e("manageContacts:reassignBillingContact","Reassign Billing Contact")}),(0,g.jsx)("span",{className:"text-gray-90 body-14",children:e("manageContacts:reassignBillingContactDetails","Any details we want to add here?")}),(0,g.jsxs)("span",{className:"text-gray-80 body-14 mt-4",children:[(0,g.jsx)(h.In,{name:"info-2"})," ",e("manageContacts:reassignChangesUpdate","Changes will take a few minutes to update.")]}),(0,g.jsxs)("div",{className:"select-billing-contact-wrap",children:[(0,g.jsx)("div",{className:"body-14",children:e("manageContacts:reassignNewBillingContact","Assign new billing contact")}),(0,g.jsx)(pe.EX,{id:"reassign-contact",className:"select-wrap",placeholder:e("manageContacts:reassignEnterNewUser","Enter new user"),minLength:-1,isLoading:!1,useCache:!1,selected:p,options:u,onSearch:e=>{},labelKey:e=>`${e.firstName||""} ${e.lastName||""}`,onChange:e=>{e&&e.length>0?v(e):v([])},renderMenuItemChildren:e=>(0,g.jsx)("div",{className:"d-flex align-item-center item-new",title:`${e.firstName} ${e.lastName}`,children:(0,g.jsx)("span",{children:`${e.firstName} ${e.lastName}`})},e.globalContactId)})]})]}),(0,g.jsx)(k.A.Footer,{children:(0,g.jsxs)("div",{className:"d-flex align-items-center gap-1 float-end",children:[(0,g.jsx)(h.$n,{level:"tertiary",onClick:b,children:e("manageContacts:reassignCancel","Cancel")}),(0,g.jsxs)(h.$n,{level:"primary",disabled:!m,onClick:async()=>
275{if(!r&&p.length>0)try{const e=await c(p[0]);d(!1),v([]);const l=a.map(a=>a.globalContactId===e.globalContactId?e:a.globalContactId===(null===t||void 0===t?void 0:t.globalContactId)?{...a,status:"Pending",isBillingContact:!1}:a);s(l)}catch(e){}},children:[r&&(0,g.jsx)(me.h,{className:"spinner omc-mr-1.5"}),r?e("manageContacts:reassignApplying","Applying..."):e("manageContacts:reassignApplyChanges","Apply Changes")]})]})})]}):null},ue=()=>{const{isEditMode:e,accountDetailsError:a,accountDetails:t,openReassignContactModal:n,refetch:s}=(0,U.y)(y.v),i=(0,l.useMemo)(()=>{var e,t;return null!==(e=a&&(null===(t=(0,ne.cx)(a))||void 0===t?void 0:t.xCorrelationId))&&void 0!==e?e:""},[a]);return a||te()(t)?(0,g.jsx)("div",{className:"billing-details-container border-1-gray-40 border-radius-8 w-75",children:(0,g.jsx)(le.A,{correlationId:i,retryCallback:()=>s()})}):(0,g.jsxs)("div",{className:"billing-details-container w-75","data-testid":"billing-details",children:[(0,g.jsx)(he,{}),e?(0,g.jsx)(xe,{}):(0,g.jsx)(oe,{}),n&&(0,g.jsx)(ve,{})]})},be=()=>{const[e]=(0,n.B)(),{currentFormMode:a}=(0,U.y)(y.b);return(0,g.jsx)("div",{className:"d-flex align-items-center mt-4",children:a===f._.ADD?(0,g.jsxs)("span",{className:"text-gray-80 body-14",children:[(0,g.jsx)(h.In,{name:"info-2"})," ",e("manageContacts:reassignChangesUpdate","Changes will take a few minutes to update.")]}):(0,g.jsx)("p",{className:"body-14 m-0",children:e("profileDetails:lockedSecDesc","To make changes to your email / username or organization, please contact Support at 888-776-0942 or email [email protected].")})})},Ce=(0,l.memo)(be);var je=t(62483),ye=t(40259),fe=t(50343),Ne=t(25680),we=t(73055),Ae=t(37639),ke=t(61956);const Ee=e=>{let{closeModal:a}=e;const{t:t}=(0,n.B)();return(0,g.jsxs)("div",{"data-testid":"edit-contact-warning-banner",className:"omc-flex omc-items-center omc-p-3 omc-whitespace-break-spaces omc-border omc-border-solid omc-border-notify-warning omc-rounded omc-text-gray-80 omc-text-[14px] omc-leading-6",children:[(0,g.jsx)(ke.h,{className:"omc-fill-notify-warning"}),(0,g.jsxs)("p",{className:"omc-ml-3 omc-p-0 omc-m-0 omc-flex omc-flex-wrap omc-gap-1",children:[(0,g.jsx)("span",{className:"omc-font-bold omc-w-max",children:t("profileDetails:errorWarningText","Changes should only be made for the user shown.")}),(0,g.jsx)("span",{className:"omc-w-max",children:t("profileDetails:errorWarningOfNewUser","If you need to add a new user, please do that")}),(0,g.jsx)("button",{onClick:a,className:"omc-w-max omc-no-underline omc-cursor-pointer omc-border-none omc-bg-transparent omc-p-0 omc-m-0 omc-text-primary-hover hover:omc-text-blue-80 focus:omc-outline-none",children:t("profileDetails:errorWarningHyperlinkText","here.")})]})]})},Se=e=>{var a,t,i,o,r;let{handleTabChange:c}=e;const[d]=(0,n.B)(),{isAddMode:m,formData:x,openAddUpdateForm:p,updatingContactDetails:v,addingContact:u,setFormData:b,formStatus:C,showEmailField:j,setShowEmailField:y,validation:N,setValidation:w,handleClose:A,handleSave:k,currentFormMode:S}=(0,Ae.M1)(),D=(0,l.useMemo)(()=>{var e,a;return null===(e=(0,W.E)(null!==(a=null===x||void 0===x?void 0:x.roles)&&void 0!==a?a:""))||void 0===e?void 0:e.includes(s.$2.INVOICE.toUpperCase())},[W.E,null===x||void 0===x?void 0:x.roles]),M=()=>{v||(y(!1),b(e=>({...e,updatedEmailAddress:""})),w(e=>({...e,updatedEmailAddress:!0})))};return(0,g.jsxs)(ye.ap,{isOpen:p,size:"lg",onClose:A,"data-testid":"form-modal",children:[(0,g.jsx)(ye.ap.Header,{children:(0,g.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,g.jsx)("span",{className:"body-16 bold omc-ml-1.5",children:m?d("manageContacts:addContact","Add Contact"):d("manageContacts:editContact","Edit Contact")}),(0,g.jsx)(h.$n,{className:"bg-transparent border-0 text-gray-80 omc-p-0",level:"tertiary",size:"sm","aria-label":"close",onClick:A,children:(0,g.jsx)(h.In,{name:"close",fill:"grey"})})]})}),(0,g.jsxs)(ye.ap.Body,{className:"omc-p-[18px]",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{children:d("manageContacts:contactDetails","Contact Details and Permissions")}),(0,g.jsx)("p",{className:"body-14",children:m?d("manageContacts:descAddContactAddDetails","Add details and assign permissions for a new contact below. New contacts will receive a portal registration email after creation."):d("manageContacts:descAddDetails","Add details and assign permissions for the contact below. New contacts will receive a portal registration email after creation.")})]}),(0,g.jsx)(Ce,{}),(0,g.jsxs)(ye.NF,{className:"d-flex flex-column",children:[(0,g.jsxs)("div",{className:"inputs-wrapper",children:[!m&&(0,g.jsx)(Ee,{closeModal:A}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(fe.A,{"data-testid":"firstName",label:"First Name",placeholder:"Enter First Name",name:"firstName",maxLength:s.C7,value:null!==(a=null===x||void 0===x?void 0:x.firstName)&&void 0!==a?a:"","aria-invalid":`${!(null!==N&&void 0!==N&&N.firstName)}`,errorMessage:d("profileDetails:persSecFirstNameInputErrorMessage","Please enter a first name."),required:!0,disabled:Boolean(S===f._.EDIT)})}),(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column mt-sm-3 mt-md-0",children:(0,g.jsx)(fe.A,{"data-testid":"lastName",label:"Last Name",maxLength:s.C7,placeholder:"Enter Last Name",name:"lastName",value:null!==(t=null===x||void 0===x?void 0:x.lastName)&&void 0!==t?t:"","aria-invalid":`${!(null!==N&&void 0!==N&&N.lastName)}`,required:!0,errorMessage:d("profileDetails:persSecLastNameInputErrorMessage","Please enter a last name.")})})]}),(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(Ne.A,{label:"Phone Number","data-testid":"phone",enableSearch:!0,value:null!==(i=null===x||void 0===x?void 0:x.phoneNumber)&&void 0!==i?i:"",name:"phoneNumber",isValid:N.phoneNumber,required:!0,errorMessage:d("profileDetails:persSecPhoneInputErrorMessage","Please enter valid phone number.")})}),(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column mt-sm-3 mt-md-0",children:(0,g.jsx)(Ne.A,{label:"Mobile Number","data-testid":"mobile",enableSearch:!0,name:"mobile",value:null!==(o=null===x||void 0===x?void 0:x.mobile)&&void 0!==o?o:"",isValid:N.mobile,errorMessage:d("profileDetails:persSecMobilePhoneInputErrorMessage","Please enter valid mobile number.")})})]}),m?(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column",children:(0,g.jsx)(we.A,{showEmailField:j,setShowEmailField:y,validation:N,handleCancelEmailRequest:M})}),(0,g.jsx)("div",{className:"col-md-6 d-flex flex-column mt-sm-3 mt-md-0",children:(0,g.jsx)(fe.A,{"data-testid":"jobTitle",label:"Job Title",placeholder:"Enter Job Title",name:"title",maxLength:s.Du,value:null!==(r=null===x||void 0===x?void 0:x.title)&&void 0!==r?r:"",isValid:N.title})})]}):(0,g.jsx)(we.A,{showEmailField:j,setShowEmailField:y,validation:N,handleCancelEmailRequest:M})]}),x.isBillingContact&&(0,g.jsxs)(g.Fragment,{children:[j&&(0,g.jsx)("hr",{className:"omc-my-0"}),(0,g.jsxs)("div",{className:"d-flex",children:[(0,g.jsx)(I,{className:"omc-mr-1.5"}),(0,g.jsxs)("span",{className:"d-flex flex-column",children:[(0,g.jsxs)("span",{children:[(0,g.jsxs)("span",{className:"body-14",children:[d("manageContacts:contactsPrimaryBillingContacts","Primary billing contact"),"."]}),(0,g.jsx)(h.$n,{level:"text",className:"cursor-pointer text-primary-blue-light text-decoration-underline body-14 omc-ml-1.5 omc-p-0",tabIndex:0,onClick:()=>{c("Billing details"),A()},children:d("manageContacts:changeContact","Change contact")})]}),(0,g.jsx)("i",{className:"body-14 text-gray-90",children:d("manageContacts:toRemovePrimaryBillingContact","To remove this contact, please assign another contact as the primary billing contact.")})]})]})]}),(0,g.jsx)("div",{className:"d-flex",children:(0,g.jsx)(E.A.Check,{type:"checkbox",id:"invoiceCheck",label:d("manageContacts:contactShouldReceiveInvoice","This contact should receive invoices via email."),checked:D,onChange:()=>{b(e=>{const a=new Set(e.roles.split(";
275").filter(Boolean)),t=s.$2.INVOICE;D?a.delete(t):a.add(t);const l=Array.from(a).join(";").concat(";");return{...e,roles:l}})},className:"selection-list-item ","data-testid":"invoice-checkbox"})})]}),(0,g.jsx)("hr",{}),(0,g.jsx)(je.A,{})]}),(0,g.jsx)(ye.ap.Footer,{children:(0,g.jsxs)(ye.IX,{className:"d-flex float-end",children:[(0,g.jsx)(h.$n,{level:"tertiary",disabled:v||u,"data-testid":"cancel-modal-form-btn",onClick:A,children:d("manageContacts:cancelBtn","Cancel")}),(0,g.jsxs)(h.$n,{level:m?"primary":"secondary",className:"ms-2",disabled:C.isSubmitDisabled,"data-testid":"save-changes-btn",onClick:v||u?void 0:k,children:[(v||u)&&(0,g.jsx)(me.h,{className:"spinner omc-mr-1.5","data-testid":"loader-icon-white"}),v||u?m?d("manageContacts:creatingContact","Creating Contact..."):d("manageContacts:updatingContact","Updating Contact..."):m?d("manageContacts:createBtn","Create Contact"):d("manageContacts:applyBtn","Apply Changes")]})]})})]})},De=(0,S.Ay)(h.aF)`
276  .deactivate-modal-header {
277    background-color: var(--danger-light-color);
278    border-color: var(--danger-color);
279    button {
280      &:focus {
281        box-shadow: 0px 0px 8px 0px var(--danger-light-color);
282      }
283    }
284  }
285  .modal-desc {
286    margin-bottom: 24px;
287  }
288  .modal-body {
289    margin: 16px 16px 28px 16px;
290  }
291  .list {
292    display: flex;
293    margin-left: 16px;
294    flex-wrap: wrap;
295    .list-item {
296      flex: 0 0 50%;
297    }
298  }
299  .unable-to-deactivate {
300    margin-top: 8px;
301  }
302  .deactivate-btn {
303    background-color: var(--danger-color);
304    outline-color: var(--danger-color);
305    border-color: var(--danger-color);
306    &:hover {
307      background-color: var(--danger-hover-color);
308      outline-color: var(--danger-hover-color);
309      border-color: var(--danger-hover-color);
310    }
311    &:disabled {
312      background-color: var(--danger-hover-color) !important;
313      outline-color: var(--danger-hover-color);
314      border-color: var(--danger-hover-color);
315    }
316  }
317`,Me=S.Ay.div`
318  .spinner {
319    height: 20px !important;
320    width: 20px !important;
321  }
322`,Be=()=>{var e,a;const[t]=(0,n.B)(),{openDeactivateForm:l,formData:s,setFormData:i,setOpenDeactivateForm:o,setContactsList:r,selectAll:c,selectedList:d,setSelectAll:m,setCheckDeactivateContact:x,setSelectedDeactivateIdAll:p,deactivatingContact:v,deactivateContacts:u,setSelectedList:b,contactsList:C}=(0,U.y)(y.b),j=d.length||1,f=()=>{o(!1);const e=setTimeout(()=>{b([]),i({})},300);return()=>{clearTimeout(e)}};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(De,{isOpen:l,size:"md",children:[(0,g.jsx)(h.aF.Header,{className:"deactivate-modal-header",children:(0,g.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,g.jsx)("span",{className:"body-16 omc-ml-1.5",children:t("manageContacts:deactivateContacts",{plural:""+(j>1?"s":"")})}),(0,g.jsx)(h.$n,{className:"bg-transparent border-0 text-gray-80 p-0",level:"tertiary",size:"sm","aria-label":"close",onClick:f,children:(0,g.jsx)(h.In,{name:"close",fill:"grey"})})]})}),(0,g.jsxs)(h.aF.Body,{className:"modal-body",children:[(0,g.jsx)("h3",{children:t("manageContacts:deactivateModalHeader",{count:j,plural:""+(j>1?"s":"")})}),(0,g.jsx)("p",{className:"modal-desc body-14",children:t("manageContacts:deactivateModalDesc","Deactivated contacts will no longer have access to their data or this account.")}),c?(0,g.jsx)("p",{className:"body-14",children:t("manageContacts:deactivateSelectAlldesc",{count:j,plural:""+(j>1?"s":"")})}):(0,g.jsx)("p",{className:"body-14",children:t("manageContacts:deactivateActionDesc","This action will deactivate the following:")}),c?null:(0,g.jsx)("div",{className:"list",children:0!==(null===d||void 0===d?void 0:d.length)?null===d||void 0===d?void 0:d.filter(e=>!e.isBillingContact).map(e=>{var a,t;return(0,g.jsxs)("div",{className:"list-item body-14 bold",children:[null!==(a=null===e||void 0===e?void 0:e.firstName)&&void 0!==a?a:""," ",null!==(t=null===e||void 0===e?void 0:e.lastName)&&void 0!==t?t:""]},e.globalContactId)}):(0,g.jsxs)("p",{className:"body-14 bold",children:[null!==(e=null===s||void 0===s?void 0:s.firstName)&&void 0!==e?e:""," ",null!==(a=null===s||void 0===s?void 0:s.lastName)&&void 0!==a?a:""]})})]}),(0,g.jsx)(h.aF.Footer,{children:(0,g.jsxs)(Me,{className:"d-flex float-end",children:[(0,g.jsx)(h.$n,{level:"tertiary",onClick:f,children:t("manageContacts:cancelBtn","Cancel")}),(0,g.jsx)(h.$n,{level:"danger",disabled:v,className:"deactivate-btn omc-ml-1.5","data-testid":"save-changes-btn",onClick:async()=>
322{if(v)return;const e=d.length>0?d.reduce((e,a)=>(e.push((a.globalContactId||"").toString()),e),[]):[(s.globalContactId||0).toString()];try{await u(e),f();const a=C.map(a=>{var t;return e.includes(null===(t=a.globalContactId)||void 0===t?void 0:t.toString())?{...a,status:"Pending"}:a});m(!1),x([]),p([]),b([]),r(a)}catch(a){}},children:v?t("manageContacts:deactivating","Deactivating..."):t("manageContacts:deactivate","Deactivate")})]})})]})})},Ie=()=>{const{fetchingContacts:e,contactsList:a,contactListError:t,refetch:n}=(0,l.useContext)(y.b),[s,i]=(0,l.useState)("Contacts"),o=(0,l.useCallback)(e=>i(e),[]),r=(0,l.useMemo)(()=>{var e,a;return null!==(e=t&&(null===(a=(0,ne.cx)(t))||void 0===a?void 0:a.xCorrelationId))&&void 0!==e?e:""},[t]);return e||!(0,p.isEmpty)(a)&&!t?(0,g.jsxs)($,{children:[(0,g.jsxs)(h.tu,{className:"omc-px-[18px] omc-py-1.5 flex-1 h-100",children:[(0,g.jsx)(w,{selectedTab:s,handleTabChange:o}),(0,g.jsxs)("div",{className:"whitespace-no-wrap omc-py-3 omc-mt-3 border-radius-4 flex-1",children:["Contacts"===s&&(0,g.jsx)(ee,{}),"Billing details"===s&&(0,g.jsx)(ue,{})]})]}),(0,g.jsx)(Se,{handleTabChange:o}),(0,g.jsx)(Be,{})]}):(0,g.jsx)($,{className:"d-flex",children:(0,g.jsx)(le.A,{correlationId:r,retryCallback:()=>n()})})},$e=()=>{const[e]=(0,n.B)(),{navigateTo:a}=(0,i.Zp)(),t=(0,i.GV)(r.u0),m=(0,i.GV)(r.bW);(0,i.Kp)(e("header:manageContacts","Manage Contacts"));const h=(0,i.GV)(o.Mv),p=(0,Ae.oT)(),v=(0,Ae.Ix)(),u=(0,l.useMemo)(()=>{const e=(m||[]).includes(s.$2.AUTHORIZED_SENDER.toUpperCase());return!t||void 0===m||e},[m,t]);return(0,i.sv)(()=>{if(parseInt(h)){if(u)return;a(s.ut.dashboard)}},[h,u],1e3),u?(0,g.jsx)(D.d4,{className:"bg-white h-100","data-testid":"manage-contacts",children:(0,g.jsxs)("div",{className:"container",children:[(0,g.jsx)(x,{}),(0,g.jsx)(c.A,{children:(0,g.jsx)(y.b.Provider,{value:p,children:(0,g.jsx)(y.v.Provider,{value:v,children:(0,g.jsx)(Ie,{})})})})]})}):(0,g.jsx)(d.A,{})}},1093(e,a,t){var l=t(48738),n=t.n(l),s=t(9950),i=t(44089),o=t(44414);const r=s.forwardRef((e,a)=>{let{bsPrefix:t,className:l,striped:s,bordered:r,borderless:c,hover:d,size:m,variant:g,responsive:x,...h}=e;const p=(0,i.oU)(t,"table"),v=n()(l,p,g&&`${p}-${g}`,m&&`${p}-${m}`,s&&`${p}-${"string"===typeof s?`striped-${s}`:"striped"}`,r&&`${p}-bordered`,c&&`${p}-borderless`,d&&`${p}-hover`),u=(0,o.jsx)("table",{...h,className:v,ref:a});if(x){let e=`${p}-responsive`;return"string"===typeof x&&(e=`${e}-${x}`),(0,o.jsx)("div",{className:e,children:u})}return u});t.d(a,["A",0,r])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.