2024-10-11 16:15:24 +08:00
|
|
|
'use client'
|
2024-10-16 15:37:32 +08:00
|
|
|
import { useState } from 'react'
|
|
|
|
import type { Plugin } from '../types'
|
|
|
|
import PluginDetailPanel from '@/app/components/plugins/plugin-detail-panel'
|
|
|
|
import {
|
|
|
|
// extensionDallE,
|
|
|
|
// modelGPT4,
|
|
|
|
toolNotion,
|
|
|
|
} from '@/app/components/plugins/card/card-mock'
|
2024-10-11 16:15:24 +08:00
|
|
|
|
2024-10-18 14:02:40 +08:00
|
|
|
import type { FilterState } from './filter-management'
|
|
|
|
import FilterManagement from './filter-management'
|
2024-10-17 15:21:56 +08:00
|
|
|
import List from './list'
|
|
|
|
|
2024-10-11 16:15:24 +08:00
|
|
|
const PluginsPanel = () => {
|
2024-10-18 14:02:40 +08:00
|
|
|
const handleFilterChange = (filters: FilterState) => {
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
2024-10-16 15:37:32 +08:00
|
|
|
const [currentPluginDetail, setCurrentPluginDetail] = useState<Plugin | undefined>(toolNotion as any)
|
2024-10-11 16:15:24 +08:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className='flex flex-col pt-1 pb-3 px-12 justify-center items-start gap-3 self-stretch'>
|
|
|
|
<div className='h-px self-stretch bg-divider-subtle'></div>
|
2024-10-18 14:02:40 +08:00
|
|
|
<FilterManagement
|
|
|
|
onFilterChange={handleFilterChange}
|
|
|
|
/>
|
2024-10-11 16:15:24 +08:00
|
|
|
</div>
|
|
|
|
<div className='flex px-12 items-start content-start gap-2 flex-grow self-stretch flex-wrap'>
|
2024-10-18 14:02:40 +08:00
|
|
|
<div className='w-full'>
|
|
|
|
<List />
|
|
|
|
</div>
|
2024-10-11 16:15:24 +08:00
|
|
|
</div>
|
2024-10-16 15:37:32 +08:00
|
|
|
<PluginDetailPanel pluginDetail={currentPluginDetail} onHide={() => setCurrentPluginDetail(undefined)} />
|
2024-10-11 16:15:24 +08:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default PluginsPanel
|