import{o as k,u as L,bZ as g,b8 as h,R as b,g as j,j as t,at as S}from"./app-BgLa5dit.js";import{a as B,b as C}from"./fZ5oUMOc.chunk.js";import{B as v}from"./Dr5_kWYc.chunk.js";import{B as u}from"./DpUpv6rY.chunk.js";import{W as N}from"./DJ0pq8J_.chunk.js";import{a as A}from"./MEkA24R1.chunk.js";import{E as y}from"./BUT90D7O.chunk.js";import{C as _}from"./CCcwLDvu.chunk.js";import{C as w}from"./q-IBKcuF.chunk.js";const U="_container_1g6fc_1",I="_subHeader_1g6fc_4",m={container:U,subHeader:I},x="bulk-user-actions-wizard";function V(e){var o,c,l;const n=k(w.customer(e.customerId)),a=e.loaded&&!!((o=e.users)!=null&&o.length)&&n.data,[s,i]=L(g.BULK_USER_ACTIONS),r=h(),p=u.getSteps(e.userType,e.userCount,e.appLinks,s==null?void 0:s.action);b.useEffect(()=>{var d;if(!((d=s==null?void 0:s.userIdMap)!=null&&d.size)&&!e.preventRedirect){j.trigger(e.appLinks.userManager,{replace:!0});return}if(!e.preventNavLock)return r.lock({id:x,title:"Are you sure you want to leave?",text:"By leaving the current page all progress will be lost.",appLinkWhitelist:u.getWizardAppLinks(e.appLinks),onConfirmUnlock:()=>{i({})}}),()=>{r.unlock(x)}},[]);function f(){i({})}return t.jsxs(A,{children:[t.jsx(_,{}),t.jsxs("div",{className:`d-flex g-0 border-bottom ${m.container}`,children:[t.jsxs("div",{className:"border-end px-3 pt-4 pb-3 d-flex flex-column justify-content-between",style:{width:"300px"},children:[t.jsxs("div",{children:[t.jsx("p",{className:m.subHeader,children:"BULK USER ACTIONS WIZARD"}),t.jsx(N,{steps:p,currentStep:e.currentStep,disableAppLinks:!a||e.disableAppLinks,theme:{itemsContainer:"mt-4",itemContent:"px-3 w-100",item:"mb-1",isSelectedOverride:"bg-light-blue fw-normal",isCompletedOverride:"text-reset"}})]}),t.jsx(S,{svg:y,className:"w-fit text-decoration-none",appLink:e.appLinks.userManager,children:t.jsx("span",{className:"ms-2",children:"Cancel and Exit"})})]}),t.jsxs("div",{className:"d-flex flex-column justify-content-between flex-grow-1",children:[t.jsxs("div",{className:"crm-studio-wizard-form",children:[t.jsxs("p",{className:"p-3 mb-0",children:[(c=n.data)==null?void 0:c.name," · ",(l=n.data)==null?void 0:l.crmId]}),t.jsx("div",{className:"px-3",children:a?e.children:t.jsx(v,{})})]}),t.jsxs("div",{className:"d-flex justify-content-end border-top p-3",children:[t.jsx(B,{currentStep:e.currentStep,appLinks:e.appLinks}),t.jsx(C,{currentStep:e.currentStep,appLinks:e.appLinks,onFinish:f,showStatusStepButton:!0,isPolling:e.isPolling})]})]})]})]})}export{V as B};
//# sourceMappingURL=CHg-RKg9.chunk.js.map
