'use client' import React, { useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import cn from 'classnames' import FilePreview from '../file-preview' import FileUploader from '../file-uploader' import NotionPagePreview from '../notion-page-preview' import EmptyDatasetCreationModal from '../empty-dataset-creation-modal' import s from './index.module.css' import type { File } from '@/models/datasets' import type { DataSourceNotionPage } from '@/models/common' import { DataSourceType } from '@/models/datasets' import Button from '@/app/components/base/button' import { NotionPageSelector } from '@/app/components/base/notion-page-selector' import { useDatasetDetailContext } from '@/context/dataset-detail' type IStepOneProps = { datasetId?: string dataSourceType?: DataSourceType dataSourceTypeDisable: Boolean hasConnection: boolean onSetting: () => void files: any[] updateFileList: (files: any[]) => void updateFile: (fileItem: any, progress: number, list: any[]) => void notionPages?: any[] updateNotionPages: (value: any[]) => void onStepChange: () => void changeType: (type: DataSourceType) => void } type Page = DataSourceNotionPage & { workspace_id: string } type NotionConnectorProps = { onSetting: () => void } export const NotionConnector = ({ onSetting }: NotionConnectorProps) => { const { t } = useTranslation() return (