import{o as g,b8 as k,R as c,g as l,F as d,j as e,at as L}from"./app-BgLa5dit.js";import{B as j,a as U}from"./BTbZzD17.chunk.js";import{B as h}from"./Dr5_kWYc.chunk.js";import{u as B}from"./DL8ott7R.chunk.js";import{B as u}from"./DpWmZ9cE.chunk.js";import{W as v}from"./DJ0pq8J_.chunk.js";import{a as S}from"./MEkA24R1.chunk.js";import{E as b}from"./BUT90D7O.chunk.js";import{C as N}from"./CCcwLDvu.chunk.js";import{C as y}from"./q-IBKcuF.chunk.js";const C="_container_1g6fc_1",E="_subHeader_1g6fc_4",m={container:C,subHeader:E},p="userManager.bulkUserUploadWizardLayout",r="bulk:user:upload:nav:lock";function D(t){var i,o;const a=g(y.customer(t.customerId)),{users:s,setUsers:x}=B(),n=k();if(c.useEffect(()=>{if(!s){l.trigger(t.appLinks.userManager,{replace:!0});return}return n.lock({id:r,title:d.getPhrase(p,"navLockTitle"),text:d.getPhrase(p,"navLockBody"),appLinkWhitelist:u.getWizardAppLinks(t.appLinks),onConfirmUnlock:()=>{x(null)}}),()=>{n.unlock(r)}},[]),c.useEffect(()=>{s!=null&&s.length||(n.unlock(r),l.trigger(t.appLinks.userManager,{replace:!0}))},[s==null?void 0:s.length]),!s)return e.jsx(e.Fragment,{});const f=a.hasCompleted;return e.jsxs(S,{children:[e.jsx(N,{}),e.jsxs("div",{className:`d-flex g-0 border-bottom ${m.container}`,children:[e.jsxs("div",{className:"border-end px-3 pt-4 pb-3 d-flex flex-column justify-content-between",style:{width:"300px"},children:[e.jsxs("div",{children:[e.jsx("p",{className:m.subHeader,children:"BULK USER ACTIONS WIZARD"}),e.jsx(v,{steps:u.getSteps(t.userType,t.canAddExistingUsers),currentStep:t.currentStep})]}),e.jsx(L,{svg:b,className:"w-fit text-decoration-none",appLink:t.appLinks.userManager,children:e.jsx("span",{className:"ms-2",children:"Cancel and Exit"})})]}),e.jsxs("div",{className:"d-flex flex-column justify-content-between flex-grow-1",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"p-3 mb-0",children:[(i=a.data)==null?void 0:i.name," · ",(o=a.data)==null?void 0:o.crmId]}),e.jsx("div",{className:"px-3",children:f?t.children:e.jsx(h,{})})]}),e.jsxs("div",{className:"d-flex justify-content-end border-top p-3",children:[e.jsx(j,{currentStep:t.currentStep,appLinks:t.appLinks}),e.jsx(U,{currentStep:t.currentStep,appLinks:t.appLinks,canAddExistingUsers:t.canAddExistingUsers,showStatusStepButton:!0,isPolling:t.isPolling})]})]})]})]})}export{D as B,r as a};
//# sourceMappingURL=CTVUBibh.chunk.js.map
