import{o as d,j as s,e9 as x,aw as g,b as w,a4 as b,ez as l,Q as P,Z as j,af as f}from"./app-BgLa5dit.js";import{E}from"./De9um1Ze.chunk.js";import{N}from"./C9Rwpp7a.chunk.js";import{b as S,C as u}from"./OEx2ZWBS.chunk.js";import{C as y,a as R}from"./DsVQ3BFu.chunk.js";import{C as I}from"./q-IBKcuF.chunk.js";import"./C4BcftDO.chunk.js";import"./CiR1qo7K.chunk.js";import"./DJ0pq8J_.chunk.js";import"./CCcwLDvu.chunk.js";import"./DDfKZ_ng.chunk.js";import"./CmeGmsFm.chunk.js";import"./Zwjmkasg.chunk.js";import"./CsH2Nu4a.chunk.js";import"./Bs6fQ2wT.chunk.js";import"./BUT90D7O.chunk.js";import"./C1fMRwzQ.chunk.js";import"./DUpYPoLs.chunk.js";import"./EZim8aq-.chunk.js";import"./BD9MrUJP.chunk.js";import"./s6cGcwlA.chunk.js";import"./4qGb1BIY.chunk.js";import"./DnXDEnAR.chunk.js";import"./DpUpv6rY.chunk.js";import"./CG7zbly5.chunk.js";import"./m4aqaK_l.chunk.js";import"./MEkA24R1.chunk.js";import"./C53kfXmd.chunk.js";const L=new RegExp("^https://clickview(?:--newproduct\\.sandbox)?\\.lightning\\.force\\.com/lightning/r/Account/([A-Za-z0-9]{18})/view$");function z({accountUrl:e}){var i;const a=(i=e==null?void 0:e.match(L))==null?void 0:i[1];return s.jsxs("span",{children:[a,s.jsx(E,{href:e,newTab:!0,children:s.jsx(P,{svg:f,size:j.Small,className:"svg-container ms-1"})})]})}function q({customer:e,cft:a}){var r,o,n,m;const{values:i}=g(),{hasPermissions:t}=w(),c=t(b.ExchangeTvProductManage),p=((o=(r=e==null?void 0:e.country)==null?void 0:r.code)==null?void 0:o.toLowerCase())===l.US,C=((m=(n=e==null?void 0:e.country)==null?void 0:n.code)==null?void 0:m.toLowerCase())===l.UK,v=[{label:"Customer name",value:{value:(e==null?void 0:e.name)||"-"}},{label:"Salesforce Account ID",value:{value:s.jsx(z,{accountUrl:i.salesforceAccountUrl})}}],h=S({cftData:a==null?void 0:a.data,cftDisplayName:(a==null?void 0:a.displayName)||i.cftName,enabledPresentations:i.enabledPresentations,enabledCurriculums:i.enabledCurriculums,enabledProducts:i.enabledProducts,enabledLibraries:i.enabledLibraries,isUs:p,isEu:C,controlExchangeTv:c});return s.jsxs("div",{className:"mt-3",children:[s.jsx(u,{heading:"Customer details",items:v}),(a==null?void 0:a.name)&&s.jsx(u,{heading:"Product details",items:h})]})}function ne(e){const a=d(I.customer(e.id)),i=d(e.queryParams.cftName&&N.customerFormationTemplate(e.queryParams.cftName)),t=!a.hasCompleted||!!e.queryParams.cftName&&!i.hasCompleted;return s.jsxs(y,{id:e.id,currentStepId:R.OVERVIEW,queryParams:e.queryParams,children:[s.jsx("h2",{className:"h3",children:"Review and confirm"}),s.jsx("p",{children:"You're about to convert the following customer to paid. Please check and confirm all details."}),t?s.jsx(x,{}):s.jsx("div",{className:"crm-studio-wizard-form",children:s.jsx(q,{customer:a.data,cft:i.data})})]})}export{ne as CustomerConvertingWizardOverviewView};
//# sourceMappingURL=DyisPd3b.chunk.js.map
