<template>
    <div class="top-area">
        <div class="img-area">
            <img class="login-logo" :src="`${img_url}`" alt="">
        </div>
        <div v-if="is_show_login" class="link-area">
            <a href="#" @click="cookiesClear">
                Already a member? Log In
            </a>
        </div>
    </div>
</template>

<script>
import {unsetStep, unsetLocalStorage} from "../../helper";

export default {
    props:{
        is_show_login:{
            default:true
        }
    },
    data(){
        return {
            APP_URL : APP_URL,
            img_url : APP_URL+'/images/'+APP_NAME+'_logo.png',
            is_show_login:this.$props.is_show_login
        }
    },
    methods:{
        cookiesClear(){
            unsetLocalStorage('formData');
            unsetLocalStorage('userQuestionAnswer');
            unsetStep();
            window.location.href = `${APP_URL}/login`;
        }
    }
}
</script>
<style scoped>
.login-logo {
    width: 150px;
    height: auto;
}
</style>
