<template>
    <v-menu
        v-model="form.menu.visible"
        :position-x="form.menu.x"
        :position-y="form.menu.y"
        absolute
        offset-y
        right
        :close-on-content-click="false"
        :close-on-click="false"
    >
        <cs-form-card 
            :form="form"
            :messageBox="null"
            
        > 
            <team-input 
                :controls="controls"
                :activeRecord="activeRecord"
                :errorsManager="errorsManager"
                :action="action"
                :currentAction="currentAction"

                @file-saved="OnFileSaved"
                @file-uploaded="OnFileUploaded"
            />

        </cs-form-card>
    </v-menu>
</template>

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

        methods: {
            OnFileSaved(saved) {
                this.form.formprovider.avatarSaved = saved;
            },

            OnFileUploaded(file) {
                this.form.formprovider.avatarSaved = false;
            }
        },

        components: {
            CsFormCard: require('@CsVueComp/cards/CsFormCard').default,
        },

        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'TeamFormMenu',
    }
</script>