<template>
	<ul class="bar">
		<NcAppNavigationNewItem :name="t('repod', 'Add a RSS link')"
			@new-item="$router.push(encodeUrl(feedUrl))">
			<template #icon>
				<Plus :size="20" />
			</template>
		</NcAppNavigationNewItem>
	</ul>
</template>

<script>
import { NcAppNavigationNewItem } from '@nextcloud/vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import { encodeUrl } from '../../utils/url.js'

export default {
	name: 'AddRss',
	components: {
		NcAppNavigationNewItem,
		Plus,
	},
	methods: {
		encodeUrl,
	},
}
</script>

<style scoped>
	.bar {
		margin-top: 2rem;
	}
</style>
