export const __webpack_esm_id__=19115;export const __webpack_esm_ids__=[19115];export const __webpack_esm_modules__={19115(){angular.module("graphdb.framework.core.directives.multiselect-dropdown",[]).directive("multiselectDropdown",["$translate",function(e){return{restrict:"E",require:"ngModel",scope:{options:"=",dropdownLabel:"=?"},templateUrl:"js/angular/core/directives/multiselect-dropdown/templates/multiselect-dropdown.html",link:function(t,n,o,r){t.isOpen=!1;const c=e=>{n[0].contains(e.target)||t.$apply(()=>{t.isOpen=!1})};t.toggleDropdown=function(){t.isOpen=!t.isOpen},t.toggleSelection=function(e){e.selected=!e.selected,(()=>{const e=t.options.filter(function(e){return e.selected});r.$setViewValue(e)})()},t.getSelectedText=function(){const n=t.options.filter(e=>e.selected);return 0===n.length?t.dropdownLabel||e.instant("common.select"):n.map(e=>e.label).join(", ")},r.$render=function(){angular.isArray(r.$viewValue)&&t.options.forEach(function(e){e.selected=r.$viewValue.some(function(t){return t.value===e.value})})},document.addEventListener("click",c),t.$on("$destroy",()=>{document.removeEventListener("click",c)})}}}])}};
//# sourceMappingURL=19115.b4d902e2cd76525e7985.bundle.js.map