import { html, noChange, nothing } from 'lit';
import { guard } from 'lit/directives/guard.js';
import type NileElement from '../internal/nile-element';
/**
* Helper class to manage virtual scroll functionality for nile-select component
*/
export class VirtualScrollHelper {
private component: NileElement;
constructor(component: NileElement) {
this.component = component;
}
renderVirtualizedContent(): any {
const component = this.component as any;
const tooltipPath = !!component.showTooltip;
return html`
component.data) : component.data}
.open=${component.open}
.loading=${component.loading}
.portal=${component.portal}
.descriptionSearchEnabled=${component.descriptionSearchEnabled}
.allowHtmlLabel=${component.allowHtmlLabel}
.enableDescription=${component.enableDescription}
.tickOnSelect=${component.tickOnSelect}
.legacy=${component.legacy}
@nile-input=${tooltipPath ? (e: CustomEvent) => component.syncValueFromVirtualSelect(e) : nothing}
@nile-change=${tooltipPath ? (e: CustomEvent) => component.syncValueFromVirtualSelect(e) : nothing}
exportparts="
select-options,
select-no-results,
virtualized,
form-control,
form-control-label,
form-control-input,
combobox,
prefix,
display-input,
tags,
tag,
clear-button,
suffix,
expand-icon,
listbox,
search,
loader,
footer,
tag__content,
option__base,
option__label,
option__prefix,
option__suffix,
option__checked-icon,
option__checkbox,
option__label_container,
option__description
"
>
`;
}
}