/**
 * 知识库
 */

import { View, Text } from "@tarojs/components";
import { useState } from "react";
import PageCustom from "@/components/page-custom/index";
import NavBarNormal from "@/components/NavBarNormal/index";
import WemetaTabs from "@/components/wemeta-tabs/index";
import PersonalTab from './components/PersonalTab'
import CompanyTab from './components/CompanyTab'
import CorrectionList from './components/CorrectionList'
import style from "./index.module.less";

export default function Index() {
  const tabList = [
    {
      key: "1",
      label: "个人知识",
      children: <View className={style.tabContent}>
        <PersonalTab />
      </View> ,
    },
    {
      key: "2",
      label: "企业知识",
      children: <View className={style.tabContent}>
          <CompanyTab/>
      </View>,
    },
    {
      key: "3",
      label: "纠错记录",
      children: <View className={style.tabContent}>
          <CorrectionList /> 
      </View>,
    },
  ];
  return (
    <PageCustom>
      <NavBarNormal scrollFadeIn leftColumn={() => <Text className="text-16 font-medium">知识库</Text>}></NavBarNormal>
      <View className="w-full">
        <View className={style.container}>
          <WemetaTabs current="1" list={tabList} className="px-16"></WemetaTabs>
        </View>
      </View>
    </PageCustom>
  );
}
