import {html, css, LitElement} from 'lit' export class ProjectsSelector extends LitElement { static style=css` slot { display: none; } ` static properties = { frame: {type: String}, _options: {type: Array, state: true} } render() { return html` ` } _handleUpdatedElements(e) { const childNodes = e.target.assignedElements({flatten: true}) this._options = childNodes.map(e => { return {name: e.innerText, href: e.getAttribute('href'), selected: !!e.getAttribute('selected')} }) } _renderOption(option) { const {name, href, selected} = option return html`` } _handleSelect(e) { const href = e.target.value Turbo.visit(href, {action: 'advance', frame: this.frame}) } }