"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../Text/Text.js"),r=require("../TextMiddleTruncated/TextMiddleTruncated.js");require("../TextMiddleTruncated/TextMiddleTruncated.constants.js");var n=require("../Chip/Chip.js"),l=require("./Autocomplete.scss.js"),i=Symbol("all-option-mark"),a=Symbol("create-option-mark"),s=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],l=t[1].allOptions;if(n.length)return 1===n.length?n[0].option.title:n.length===l.length?"All":"".concat(n.length," Selected")};exports.AllOptionMark=i,exports.CreateOptionMark=a,exports.isRealOption=function(e){return!e[i]&&!e[a]},exports.renderOptionDefault=function(t){return e.jsx(r.TextMiddleTruncated,{children:t.title})},exports.renderSelectedValue=function(){var n=s.apply(void 0,arguments);return n?e.jsx(t.Text,{size:16,color:"T1",className:l.selectedValue,children:e.jsx(r.TextMiddleTruncated,{children:n},n)}):null},exports.renderSelectedValueChips=function(t){if(0!==t.length)return e.jsx(e.Fragment,{children:t.map((function(t){var i=t.option,a=t.onDelete;return e.jsx(n.Chip,{className:l.selectedValueChip,onDelete:a,size:"small",shape:"square",children:e.jsx(r.TextMiddleTruncated,{children:i.title})},i.id)}))})};
//# sourceMappingURL=utils.js.map
