<template>
  <div id="app">
    <SearchPage v-if="currentPage === 'search'" @search="handleSearch" />
    <ResultsPage v-else :searchQuery="searchQuery" @back="goToSearch" />
  </div>
</template>

<script>
import SearchPage from './components/SearchPage.vue';
import ResultsPage from './components/ResultsPage.vue';

export default {
  name: 'App',
  components: {
    SearchPage,
    ResultsPage
  },
  data() {
    return {
      currentPage: 'search',
      searchQuery: ''
    };
  },
  methods: {
    handleSearch(query) {
      this.searchQuery = query;
      this.currentPage = 'results';
    },
    goToSearch() {
      this.currentPage = 'search';
    }
  }
};
</script>

<style>
#app {
  font-family: Arial, sans-serif;
}
</style>