/**
 * Copyright 2018 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import{LitElement as e,html as t,css as n}from"../../../lit/index.js";class SimpleSearchContent extends e{static get tag(){return"simple-search-content"}enableSearch(e){e.addEventListener("simple-search",(t=>this._searchContent(e))),e.addEventListener("goto-result",(e=>this.focus(e.detail)))}_searchContent(e){let t=this.innerHTML;this.innerHTML=e.findMatches(t)}focus(e){let t=this.querySelector('[match-number="'+e+'"]');null!=t&&t.focus()}render(){return t` <slot></slot> `}}customElements.define(SimpleSearchContent.tag,SimpleSearchContent);export{SimpleSearchContent};