<template>
    <div class="report_header">
        <div class="d-flex justify-content-between">
            <div class="logo">
                <!-- <img :src="company.logo" alt="" width="120px" /> -->
            </div>
            <div class="title text-center">
                <p class="title_km h2 text_moul">{{ company.name_kh }}</p>
                <p class="title_en h5">{{ company.name_en }}</p>
                <p class="title_en h5 text_koulen"> {{ title }}  </p>
                <template v-if="$scopedSlots['date']">
                    <slot name="date"></slot>
                </template>
            </div>
            <div>
                <i> </i>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        props:{
            title:{
                type: String,
                default: function () {
                    return 'របាយការណ័'
                }
            }
        },
        data(){
            return{
                company:"",
                print_date:'',
                com_info:'',
            }
        },
        created() {
            this.funGetCompanyInfo();
        },
        methods: {
            funGetCompanyInfo(){
                axios.get('admin-api/company')
                .then((res) => {
                    this.company = res.data;
                });
            },
            currentDateTime() {
                const current = new Date();
                const date = current.getDate() + '-' + (current.getMonth() + 1) + '-' + current.getFullYear();
                const time = current.getHours() + ":" + current.getMinutes() + ":" + current.getSeconds();
                const dateTime = date + ' ' + time;

                return dateTime;
            },
        }
    }
</script>

