// Compiled from: Searchable_Select.jqhtml
(function() {
'use strict';
const template_Searchable_Select = {
_jqhtml_version: '2.2.185',
name: 'Searchable_Select',
tag: 'div',
defaultAttributes: {"class": "dropdown"},
render: function render(data, args, content, jqhtml) { let _output = []; const _cid = this._cid; const that = this;
_output.push(" "); if (this.args.label) {
_output.push(" ");_output.push({tag: ["label", {"class": "form-label"}, false]}); (() => { const result = this.args.label ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("");
_output.push(" "); }
_output.push(" ");_output.push({tag: ["button", {"class": "btn btn-secondary dropdown-toggle w-100 text-start", "type": "button", "data-bs-toggle": "dropdown", "aria-expanded": "false", "id": "button" + ":" + this._cid, "data-id": "button"}, false]});
_output.push(" ");_output.push({tag: ["span", {"id": "selected_text" + ":" + this._cid, "data-id": "selected_text"}, false]}); (() => { const result = this.args.placeholder || 'Select an option' ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push("");
_output.push(" "); _output.push("");
_output.push({tag: ["div", {"class": "dropdown-menu w-100", "id": "menu" + ":" + this._cid, "data-id": "menu"}, false]});
_output.push(" ");_output.push({tag: ["div", {"class": "px-3 py-2"}, false]});
_output.push(" ");_output.push({tag: ["input", {"type": "search", "class": "form-control form-control-sm", "placeholder": "Search...", "id": "search" + ":" + this._cid, "data-id": "search"}, true]}); _output.push("");
_output.push(" "); _output.push("");
_output.push({tag: ["div", {"class": "dropdown-divider"}, false]}); _output.push("");
_output.push(" ");_output.push({tag: ["div", {"id": "options" + ":" + this._cid, "data-id": "options", "style": "max-height: 250px; overflow-y: auto;"}, false]});
_output.push(" "); _output.push("");
_output.push(" "); _output.push("");
_output.push("");
return [_output, this]; },
dependencies: []
};
// Self-register with jqhtml runtime
// Must use window.jqhtml since we're in bundle scope
if (!window.jqhtml) {
throw new Error('FATAL: window.jqhtml is not defined. The jqhtml runtime must be loaded before registering templates.');
}
// Auto-register following standard jqhtml pattern
window.jqhtml.register_template(template_Searchable_Select);
})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlYXJjaGFibGVfc2VsZWN0LmpxaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8RGVmaW5lOlNlYXJjaGFibGVfU2VsZWN0IGNsYXNzPVwiZHJvcGRvd25cIj5cbiAgPCUgaWYgKHRoaXMuYXJncy5sYWJlbCkgeyAlPlxuICAgIDxsYWJlbCBjbGFzcz1cImZvcm0tbGFiZWxcIj48JT0gdGhpcy5hcmdzLmxhYmVsICU+PC9sYWJlbD5cbiAgPCUgfSAlPlxuICA8YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1zZWNvbmRhcnkgZHJvcGRvd24tdG9nZ2xlIHctMTAwIHRleHQtc3RhcnRcIiB0eXBlPVwiYnV0dG9uXCIgZGF0YS1icy10b2dnbGU9XCJkcm9wZG93blwiIGFyaWEtZXhwYW5kZWQ9XCJmYWxzZVwiICRpZD1cImJ1dHRvblwiPlxuICAgIDxzcGFuICRpZD1cInNlbGVjdGVkX3RleHRcIj48JT0gdGhpcy5hcmdzLnBsYWNlaG9sZGVyIHx8ICdTZWxlY3QgYW4gb3B0aW9uJyAlPjwvc3Bhbj5cbiAgPC9idXR0b24+XG4gIDxkaXYgY2xhc3M9XCJkcm9wZG93bi1tZW51IHctMTAwXCIgJGlkPVwibWVudVwiPlxuICAgIDxkaXYgY2xhc3M9XCJweC0zIHB5LTJcIj5cbiAgICAgIDxpbnB1dCB0eXBlPVwic2VhcmNoXCIgY2xhc3M9XCJmb3JtLWNvbnRyb2wgZm9ybS1jb250cm9sLXNtXCIgcGxhY2Vob2xkZXI9XCJTZWFyY2guLi5cIiAkaWQ9XCJzZWFyY2hcIj5cbiAgICA8L2Rpdj5cbiAgICA8ZGl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