import { View } from "@tarojs/components";
import './MetricModalTime.scss'
import LimitPickers from "@/components/input/LimitPickers";
import { useState } from "react";
import { useTranslation } from "react-i18next";
export default function Component(props: { item: any, time: number, limit: number, limitDay: number, cancel: Function, confirm: Function }) {
    const [metricItem, setMetricItem] = useState(props.item)
    const { t } = useTranslation()
    return <View className='modal_content'>
        <LimitPickers
            isRealTime={true} time={props.time} limit={props.limit}
            title={t('feature.track_something.picker_datetime')}
            themeColor={metricItem.theme_color}
            limitDay={props.limitDay} onCancel={() => { props.cancel() }}
            onChange={(e) => {

                // chooseTime(e)
                props.confirm(e)
            }} />
    </View>
}