import React from 'react'
import { View, Text, RichText, ScrollView } from '@tarojs/components'
import Taro from '@tarojs/taro'
import { useScrollHeight } from '@/hooks/useScrollHeight'

definePageConfig({
  navigationBarTitleText: '文章详情',
})

const content = '<p style="color:#666;font-size:14px;line-height:1.8;">文章内容区域，后续对接CMS文章API后自动渲染。</p>'

const ArticleDetailPage: React.FC = () => {
  const scrollHeight = useScrollHeight(44)

  return (
    <View className='min-h-screen bg-white'>
      <ScrollView scrollY style={{ height: scrollHeight }}>
        <View className='p-4'>
          <Text className='text-lg font-bold text-gray-800 block mb-2'>文章标题</Text>
          <Text className='text-xs text-gray-400 block mb-4'>2026-05-11</Text>
          <RichText nodes={content} />
        </View>
      </ScrollView>
    </View>
  )
}

export default ArticleDetailPage
