<template>
    <div>
        <v-card tile flat
            :width="app.width"
            :height="height ? height : app.height"
            :disabled="uploader.page_disabled"
        >
            <cs-centered-alert
                v-if="uploader.loading"
                :height="height ? height : app.height"
                :width="app.width"
                message="Se încarcă..."
            >
                <v-progress-circular
                    indeterminate
                    color="orange darken-1"
                >
                </v-progress-circular>
            </cs-centered-alert>

            <uploader-page 
                v-else
                :uploader="uploader"
                :height="height ? height : app.height"
            />
        </v-card>

        <folder-form-menu 
            :app="app"
            :form="app.forms.Folders"
        />

        <folders-access-menu 
            :app="app"
            :menu="app.menus.Folderaccess"
        />

        <folder-properties-menu 
            :app="app"
            :menu="app.menus.Folderproperties"
        />

        <file-form-menu 
            :app="app"
            :form="app.forms.Files"
        />

        <file-properties-menu 
            :app="app"
            :menu="app.menus.Fileproperties"
        />

        <files-move-menu 
            :app="app"
            :menu="app.menus.Filemove"
        />

        <files-order-menu 
            :app="app"
            :menu="app.menus.Fileorder"
        />

        <files-download-menu 
            :app="app"
            :menu="app.menus.Filedownload"
        />

        <files-change-status-menu 
            :app="app"
            :menu="app.menus.Filechangestatus"
            @status-changed="OnStatusChanged"
        />

        <files-delete-menu 
            :app="app"
            :menu="app.menus.Filedelete"
        />

        <right-menu 
            :menu="app.menus.Folderrightmenu"
        />

        <right-menu 
            :menu="app.menus.Filerightmenu"
        />
    </div>
</template>

<script>
    export default {
        props: {
            app: {required: true},
            height: {default: null},
        },

        computed: {
            uploader() {
                return this.app.classes.Customeruploader;
            }
        },

        methods: {
            OnStatusChanged() {
            }
        },

        components: {
            CsCenteredAlert: require('@CsVueComp/sheets/CsCenteredAlert').default,
            RightMenu: require('@CsVueComp/menus/rightmenu/RightMenu').default,
        },

        name: 'CustomerUploaderIndex',
    }
</script>