import styles from './style.module.css'
import UploadedImage from '../UploadImage'
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
import CustomTag from '@/components/CustomTag'
import CustomImageSelect from '@/components/CustomImageSelect'

const Maximize = () => {
    const { t } = useTranslation('studio')
    const message = t('toast.picCustomHWLimitMessage', {
        maxHeight: 1024,
        maxWidth: 1024,
    })
    const [uploadingMain, setUploadingMain] = useState(false)
    const beforeUploading = async (file) => {
        console.log(file, uploadingMain)
    }
    return (
        <div className={styles.maximize}>
            <UploadedImage
                customVerfiyMessage={message}
                maxWidth={1024}
                maxHeight={1024}
                setUploading={setUploadingMain}
                beforeUploading={beforeUploading}
            ></UploadedImage>

            <div className={styles.maximizeTag}>
                <CustomTag
                    options={[
                        { key: 1, value: '2x' },
                        { key: 2, value: '4x' },
                    ]}
                    value={[1]}
                    onChange={(value) => {
                        // handleTaskResult(item.key, value)
                        console.log(value, '-------')
                    }}
                    label={'放大倍数'}
                ></CustomTag>
            </div>

            <div className={styles.maximizeWay}>
                <CustomImageSelect
                    label="放大方式"
                    list={[
                        {
                            name: '普通放大',
                            id: 1,
                            image: '	https://ai-image.weshop.com/3c0aa4b9-3e2f-46ee-b007-d389f5fc7e0e.png_256x256.jpeg',
                        },
                        {
                            name: '普通放大',
                            id: 2,
                            image: '	https://ai-image.weshop.com/3c0aa4b9-3e2f-46ee-b007-d389f5fc7e0e.png_256x256.jpeg',
                        },
                    ]}
                    type="test"
                ></CustomImageSelect>
            </div>
        </div>
    )
}

export default Maximize
