<template>
    <v-dialog
        v-model="dialog" 
        persistent 
        :overlay="false"
        max-width="400px"
        transition="dialog-transition"
    >
        <v-card>
            <v-card-title primary-title color="orange">
                <h3 class="title">DUPLIKASI HARGA</h3> 
            </v-card-title>

            <v-card-text>
                <v-layout row wrap>
                    <v-flex xs12>
                        <one-md-price-copy-list></one-md-price-copy-list>
                    </v-flex>
                </v-layout>
            </v-card-text>

            <v-card-actions>
                
                <v-btn color="primary" flat dark @click="dialog=!dialog">Tutup</v-btn>
                <v-spacer></v-spacer>
                <v-btn color="primary" dark @click="save">Simpan</v-btn>
            </v-card-actions>
        </v-card>
    </v-dialog>
</template>

<script>
module.exports = {
    components : {
        'one-md-price-copy-list': httpVueLoader('./oneMdPriceCopyList.vue')
    },

    data() {
        return {
        }
    },

    computed : {
        dialog : {
            get() { return this.$store.state.price_copy.dialog_copy },
            set(v) { this.$store.commit('price_copy/update_dialog_copy', v) }
        }
    },

    methods : {
        save () {
            this.$store.dispatch('price_copy/save_copy')
        }
    }
}
</script>