<template>
    <div class="detail-page">
        <header class="detail-header">
            <button class="back-button" type="button" @click="router.back()">{{ t('返回') }}</button>
            <div class="detail-title">{{ t('自定义页面') }}</div>
            <div class="header-placeholder" />
        </header>

        <div class="detail-content">
            <div class="session-card">
                <div class="session-label">sessionId</div>
                <div class="session-value">{{ sessionId }}</div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';

const route = useRoute();
const router = useRouter();
const { t } = useI18n();

const sessionId = computed(() => route.params.sessionId as string);
</script>

<style scoped>
.detail-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.detail-header {
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e7e8ea;
}

.back-button,
.header-placeholder {
    width: 56px;
    flex-shrink: 0;
}

.back-button {
    border: none;
    background: transparent;
    color: #0052d9;
    font-size: 14px;
    padding: 0;
    text-align: left;
}

.detail-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.detail-content {
    flex: 1;
    padding: 16px;
}

.session-card {
    padding: 16px;
    border-radius: 12px;
    background: #fff;
}

.session-label {
    color: #999;
    font-size: 14px;
    line-height: 20px;
}

.session-value {
    margin-top: 8px;
    color: #222;
    font-size: 16px;
    line-height: 24px;
    word-break: break-all;
}
</style>