import React from "react"
import { Card, Form, Input, InputNumber } from "antd";
import style from '../index.less'
import New1Radio from "@/pages/launchSystemV3/components/New1Radio";

const AdgroupsTarget: React.FC<{ marketingCarrierType: string }> = ({ marketingCarrierType }) => {

    return <Card
        title={<strong style={{ fontSize: 18 }}>定向</strong>}
        className="cardResetCss"
    >
        <Form.Item
            label={<strong>定向策略</strong>}
            name={'smartTargetingMode'}
        >
            <New1Radio data={[{ label: '智能定向', value: 'SMART_TARGETING_OPEN' }, { label: '手动定向', value: 'SMART_TARGETING_MANUAL' }]} />
        </Form.Item>
        {['MARKETING_CARRIER_TYPE_APP_ANDROID', 'MARKETING_CARRIER_TYPE_APP_IOS'].includes(marketingCarrierType) && <Form.Item
            label={<strong>RTA 策略</strong>}
        >
            <Card bordered className="cardResetCss newCss" bodyStyle={{ padding: 0 }}>
                <div className={style.newSpace}>
                    <div className={style.newSpace_top}>
                        <div className={style.newSpace_title}>RTA ID</div>
                        <Form.Item name="rtaId" style={{ marginBottom: 0 }}>
                            <InputNumber style={{ width: 480 }} controls={false} keyboard={false} placeholder="请输入RTA ID" />
                        </Form.Item>
                    </div>
                </div>
                <div className={style.newSpace}>
                    <div className={style.newSpace_top}>
                        <div className={style.newSpace_title}>策略 ID</div>
                        <Form.Item name="rtaTargetId" style={{ marginBottom: 0 }}>
                            <Input placeholder="请输入策略 ID" style={{ width: 480 }} />
                        </Form.Item>
                    </div>
                </div>
            </Card>
        </Form.Item>}
    </Card>
}


export default React.memo(AdgroupsTarget)