import React from 'react'
import { Row, Col } from 'reactstrap'
import classes from './OrderForm.module.scss';
import { useTranslation } from 'react-i18next';
import { ChangeformatDate } from '../../../utils/Date/ChangeFormat';
export default function OrderForm({ order }) {
    
    const [t] = useTranslation();
    return (
        <>
            <Row xs={1} sm={1} md={2} lg={3} xl={3}>
            <Col className={classes.test} >
                    <p >{t("customer_name")}{" : "}{order.user?.name}</p>
                    <p >{t("customer_phone_number")}{" : "}{order.user?.phone}</p>
                    <p >{t("order_created_at")}{" : "}{ChangeformatDate(order.created_at)}</p>
                </Col>
                <Col className={classes.test} >
                    <p >{t("address")}{" : "}{order?.form?.address}</p>
                    <p >{t("country")}{" : "}{order?.form?.country}</p>
                    <p >{t("note")}{" : "}{order?.form?.note}</p>

                </Col>
                
               
            </Row>
            <Row className={classes.Wrapper}>
              
                    <div className={classes.totalsForm}>

                        <h1 >{t("totals")}</h1>
                        <p >{t("sub_total")}{" : "}{order?.total}</p>
                        <p >{t("delivery_fee")}{" : "}{0}</p>
                        <p >{t("overall_total")}{" : "}{order?.total}</p>
                    </div>
         
            </Row>
        </>
    )
}
