import React, { useState } from 'react';
import { Radio, Card } from 'antd';
import Basic from './Basic';
// import Poster from './Poster';
import Share from '@/components/Share';
import Poster from '@/components/Poster'

const type= 'look'
/**
 *
 *
 * @param {*} props
 * @returns
 */
const Edit = props => {
  const [tab, changeTab] = useState('basic');
  const { dynamicId } = props.location.query;
  const target = { id:dynamicId, type: 'activity' }
  return (
    <Card>
      <div>
        <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
          <Radio.Button value="basic">基本信息</Radio.Button>
          {/* <Radio.Button value="poster">海报图片</Radio.Button>
          <Radio.Button value="share">分享设置</Radio.Button> */}
        </Radio.Group>
      </div>
      <div>
        {tab === 'basic' && <Basic dynamicId={dynamicId} type={type}/>}
        {tab === 'poster' && <Poster target={target} />}
        {tab === 'share' && <Share target={target} />}
      </div>
    </Card>
  );
};

export default Edit;
