import SearchDialogFilters from '../components/search/dialog/Filters.vue'
import SearchDialogSort from '../components/search/dialog/Sort.vue'

export default () => {
    const { dialog, t } = inject('service')

    return reactive({
        btns: {
            toolbar: {
                filter: {
                    props: {
                        label: t('filter'),
                        icon: "isax isax-setting-5",
                        iconPos: "right",
                        link: true
                    },
                    click: () => dialog.show(SearchDialogFilters)
                },
                sort: {
                    props: {
                        label: t('ordering'),
                        icon: "isax isax-sort",
                        iconPos: "right",
                        link: true
                    },
                    click: () => dialog.show(SearchDialogSort)
                },
            },
            close: {
                props: { icon: 'isax isax-close-circle', severity: 'secondary', rounded: true, text: true }
            },
        },
        sorts: ['mostRelevant', 'mostVisited', 'newest', 'bestselling', 'cheapest', 'mostExpensive', 'buyersSuggestion']
    })
}