import './styles/admin.scss'
import './index.js'

import App from './app';
import {dashboard as components} from './components'

const DashboardApp = {
    ...App,
    components: {...App.components, ...components},

    data() {
        return {
            modalItem: null,
        }
    },

    methods: {
        ...App.methods,

        fileSelected(select, input, preview) {
            const item = this.$refs[select].item
            if(item) {
                this.$refs[input].value = item.id
                if(preview)
                    preview.src = item.file
            }
        },
    }
}
export default DashboardApp;


window.App = DashboardApp
