import{j as t,Q as o,by as s,cn as r,F as c,co as l,cp as m,w as g}from"./app-BgLa5dit.js";import{T as d}from"./CRMfsAcH.chunk.js";import{a as u}from"./BSRfXcBg.chunk.js";const S="_container_sxosy_1",h="_suggestionsContainerOpen_sxosy_11",C="_selectionContainer_sxosy_18",x="_sectionContainer_sxosy_28",a={container:S,suggestionsContainerOpen:h,selectionContainer:C,sectionContainer:x},y="shared.tokenizedTypeahead";f.defaultProps={renderSuggestionsOnInputFocus:!0};function f(e){var i;return t.jsxs("div",{className:`form-control h-auto d-flex align-items-top position-relative ${e.hideIcon?"":"py-1 px-0"} ${e.className}`,children:[!e.hideIcon&&t.jsx(o,{className:"svg-container m-1",svg:s}),t.jsxs("div",{className:`${a.selectionContainer} d-flex flex-wrap align-items-center mt-n1`,children:[e.selections.map(n=>e.getInputTokenComponent?e.getInputTokenComponent(n):t.jsx(u,{selection:n,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience},n.id)),t.jsx(r,{...e,onBackspace:()=>{e.selections.length&&e.removeSelection(g.last(e.selections))},recentSearchHeading:e.recentSearchHeading||c.getPhrase(y,"recentSearchHeading"),placeholder:(i=e.selections)!=null&&i.length?" ":e.placeholder,searchIconPlacement:!1,clearQueryOnSelect:!0,getSuggestionComponent:n=>e.getSuggestionComponent?e.getSuggestionComponent(n):t.jsx(m,{entity:n,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience}),getEmptyStateComponent:n=>{if(e.getEmptyStateComponent)return e.getEmptyStateComponent(n);e.emptyStateImageUrl&&(d,e.emptyStateImageUrl)},getErrorStateComponent:n=>t.jsx(l,{imageUrl:e.errorStateImageUrl,onClickTryAgain:n}),theme:{container:a.container,suggestionsContainerOpen:`bg-white py-1 rounded border mt-1 ${a.suggestionsContainerOpen}`,sectionContainer:`border-bottom py-1 ${a.sectionContainer}`},sectionTitleClassName:"ps-2",renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]})]}),!!e.sharePermissionsDescription&&t.jsx("span",{className:"px-2 text-secondary text-nowrap",children:e.sharePermissionsDescription})]})}export{f as T};
//# sourceMappingURL=DG2-quVR.chunk.js.map
