import{j as a,aw as t,cn as o}from"./app-BgLa5dit.js";import{S as l}from"./BSa28HTr.chunk.js";function c(e){return a.jsx("span",{children:a.jsxs("span",{className:"ms-2",children:[e.organisation.name," - ",e.organisation.id]})})}function d(e){var i;const s=t();return s.values.organisationChecked?a.jsxs("div",{className:"pb-3",children:[a.jsx("div",{className:`pb-1 ${e.searchBarClassName??""}`,children:a.jsx(o,{placeholder:"Search for an organisation",onSuggestionSelected:n=>{var r;s.setFieldValue("organisation",n),(r=e.onSelect)==null||r.call(e,n)},getRemoteUrl:n=>l.searchOrganisation(n),activationLength:2,getSuggestionComponent:n=>a.jsx(c,{organisation:n}),renderAsForm:!1})}),!!((i=s.values.organisation)!=null&&i.name)&&a.jsxs("span",{children:[a.jsx("span",{className:"fw-semibold",children:"Selected Organisation:"})," ",s.values.organisation.name," - ",s.values.organisation.id]})]}):null}export{d as S};
//# sourceMappingURL=DPWqkAZK.chunk.js.map
