= 0 ? `${id}-opt-${p.highlight}` : ''}
autocomplete="off"
placeholder=${text.placeholder}
.value=${p.query}
@input=${(e: Event) => p.input((e.target as HTMLInputElement).value)}
@keydown=${(e: KeyboardEvent) => p.keydown(e)}
@focus=${() => p.focus()}
@blur=${() => p.close()}
/>
${p.loading ? html`
` : nothing}
${
p.open
? html`
${
p.options.length === 0
? html`- ${text.empty}
`
: p.options.map(
(o, i) => html`- e.preventDefault()}
@click=${() => p.pick(o)}
>
${o.label}
`,
)
}
`
: nothing
}
${p.error ? html`