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

import App from './app';
import components from './components/admin.js'

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

    data() {
        return {
            ...super.data,
            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 AdminApp;


window.App = AdminApp
