"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomMultipleSelection = void 0;
var aurelia_framework_1 = require("aurelia-framework");
require("select2");
var ui_internal_1 = require("../../../utils/ui-internal");
var MultipleSelection = jQuery.fn.select2.amd.require('select2/selection/multiple');
var CustomMultipleSelection = (function (_super) {
    __extends(CustomMultipleSelection, _super);
    function CustomMultipleSelection($element, options) {
        return _super.call(this, $element, options) || this;
    }
    CustomMultipleSelection.prototype.selectionContainer = function () {
        var html = "<template><ui-button size=\"sm\" icon=\"digi-cross\" class=\"select2-selection__choice__remove\" type=\"tool\"></ui-button></template>";
        var view = ui_internal_1.UIInternal.compileTemplate(html, this, (0, aurelia_framework_1.createOverrideContext)(this));
        var $container = $('<li class="select2-selection__choice">' +
            view.firstChild.outerHTML +
            '<span class="select2-selection__choice__display"></span>' +
            '</li>');
        return $container;
    };
    return CustomMultipleSelection;
}(MultipleSelection));
exports.CustomMultipleSelection = CustomMultipleSelection;

//# sourceMappingURL=custom-multiple-selection.js.map
