import React, { useState } from 'react'
import { Card, Tabs } from 'antd';
import './index.less'
import Ad from './ad';
import Creative from './creative';
import Targeting from './targeting';

const { TabPane } = Tabs;
const tabsConfig = [
    // { key: '1', tab: '计划模板',jsx:<Campaign/> },
    { key: '1', tab: '广告模板', jsx: <Ad /> },
    { key: '2', tab: '创意模板', jsx: <Creative /> },
    { key: '3', tab: '定向模板', jsx: <Targeting /> },
    // { key: '4', tab: '商品库模板', jsx: <Goods /> },
]
function LocalAd() {
    const [activeKey, setActiveKey] = useState('1')
    return <Card>
        <Tabs activeKey={activeKey} type="card" onChange={(activeKey) => { setActiveKey(activeKey) }} >
            {
                tabsConfig?.map(item => {
                    return <TabPane tab={item.tab} key={item.key} >
                        {item.jsx}
                    </TabPane>
                })
            }
        </Tabs>
    </Card>
}
export default LocalAd