class ResultsButton {
  constructor (url) {
    this._url = url;
    this._query = '';
  }

  set query (query) {
    this._query = query;
  }

  get query () {
    return this._query;
  }

  render () {
    return `<button id="results-dropdown-button" class="fr-btn fr-btn--secondary fr-mt-2v" onclick="document.location.href='${this._url}?query=${this._query}';">${window.resource?.search?.results?.button}</button>`;
  }
}

export { ResultsButton };
