import{j as e,Y as u,b7 as i,R as x,eE as U,cD as d}from"./app-BgLa5dit.js";import{u as L}from"./DL8ott7R.chunk.js";import{W as m}from"./MEkA24R1.chunk.js";const f="userManager.userWizardBackButtons";function j(a){return a.currentStep==="status"?e.jsx(e.Fragment,{}):e.jsx(u,{className:"btn btn-link me-2",appLink:a.appLinks.userManager,children:e.jsx(i,{namespace:f,phrase:"cancel"})})}const r="userManager.userWizardHeader";function B(a){const{duplicateSets:c,hasExistingUsers:s}=L(),{disableNext:n,onClickConfirm:l}=x.useContext(m),o=!!(c!=null&&c.length),t=U.getCurrentContext().appLink;if(a.showStatusStepButton&&t.action===a.appLinks.userUploadStatus.polling.action)return e.jsx(d,{className:a.isPolling?"disabled":"",variant:"dark",onClick:l,disabled:n,children:e.jsx(i,{namespace:r,phrase:"create"})});if(t.action===a.appLinks.userUploadStatus.polling.action)return e.jsx(e.Fragment,{});if(t.action===a.appLinks.userUploadStatus.complete.action&&a.showStatusStepButton)return e.jsx(u,{className:`btn btn-dark ${a.isPolling?"disabled":""}`,appLink:a.appLinks.userManager,disabled:n,children:e.jsx(i,{namespace:r,phrase:"finish"})});if(t.action===a.appLinks.userUploadStatus.complete.action&&!a.showStatusStepButton)return e.jsx(e.Fragment,{});function p(){switch(t.action){case a.appLinks.userUploadPopup.action:case a.appLinks.userUploadReviewAccounts.action:return!o&&!s;case a.appLinks.userUploadFixDuplicates.action:return!s;case a.appLinks.userUploadReviewExistingAccounts.action:return!s;default:return!0}}if(p())return e.jsx(d,{className:n?"disabled":"",variant:"dark",onClick:l,disabled:n,children:e.jsx(i,{namespace:r,phrase:"create"})});function k(){switch(t.action){case a.appLinks.userUploadReviewAccounts.action:if(o)return a.appLinks.userUploadFixDuplicates;if(s&&a.canAddExistingUsers)return a.appLinks.userUploadReviewExistingAccounts;case a.appLinks.userUploadFixDuplicates.action:if(s&&a.canAddExistingUsers)return a.appLinks.userUploadReviewExistingAccounts;case a.appLinks.userUploadReviewExistingAccounts.action:if(a.canAddExistingUsers)return a.appLinks.userUploadConfirmation;default:return null}}return e.jsx(u,{className:`btn btn-dark ${n?"disabled":""}`,appLink:k(),disabled:n,children:e.jsx(i,{namespace:r,phrase:"next"})})}export{j as B,B as a};
//# sourceMappingURL=BTbZzD17.chunk.js.map
