const html = require('choo/html'); const { SearchController } = require('./controller'); // The controller for this view, where processing should happen. const { resultDetails } = require('./resultDetails'); const { modal } = require('../partials/modal'); // This is the view function that is exported and used in the view manager. const searchView = (state, emit, i18n) => { const controller = new SearchController(state, emit, i18n); const { __ } = controller.i18n; if (controller.hasQuery && controller.queryIsNew) { controller.search(); } else if (controller.state.lastSearch !== '') { controller.appState.query.for = controller.state.lastSearch; } // Returning an array in a view allows non-shared parent HTML elements. return [ html``, html`
${__('search.search_source.help.text')}
`, html`