<template>
    <div class="app-container">
        <div class="background-color-fff border-radius-8px" style="overflow: hidden">
            <TUIKit style="height: 780px" />
            <TUICallKit
                class="callkit-container"
                :allowedMinimized="true"
                :allowedFullScreen="false"
            />
        </div>
    </div>
</template>
<script lang="ts" setup>
import { TUIKit } from '@/TUIKit';
import { TUICallKit } from '@trtc/calls-uikit-vue';
import { TUILogin } from '@tencentcloud/tui-core-lite';
import { framework } from '@/TUIKit/adapter-vue';
import useUserStore from '@/store/modules/user';

const userStore = useUserStore();

TUILogin.login({
    SDKAppID: userStore.userInfo.sdkappid,
    userID: userStore.userInfo.tximIdentifier,
    userSig: userStore.userInfo.tximUserSig,
    useUploadPlugin: true,
    framework,
})
    .then(() => {
        console.log('登录成功');
    })
    .catch(error => {
        console.log('userStore:', userStore);
        console.log('error 登录失败:', error);
    });
</script>
<style lang="scss">
.TUIKit {
    height: 100%;
}
</style>
