<template>
	<AppContent class="main">
		<NcTextField :label="t('repod', 'Find a podcast')" :value.sync="search">
			<Magnify :size="20" />
		</NcTextField>
		<Search v-if="search" :value="search" />
		<Toplist v-if="!search" type="hot" />
		<Toplist v-if="!search" type="new" />
		<AddRss v-if="!search" />
	</AppContent>
</template>

<script>
import AddRss from '../components/Discover/AddRss.vue'
import AppContent from '../components/Atoms/AppContent.vue'
import Magnify from 'vue-material-design-icons/Magnify.vue'
import { NcTextField } from '@nextcloud/vue'
import Search from '../components/Discover/Search.vue'
import Toplist from '../components/Discover/Toplist.vue'

export default {
	name: 'Discover',
	components: {
		AddRss,
		AppContent,
		Magnify,
		NcTextField,
		Search,
		Toplist,
	},
	data() {
		return {
			search: '',
		}
	},
}
</script>

<style scoped>
	.main {
		padding: 15px 51px;
	}
</style>
