// ** React Imports import { Ref, useState, forwardRef, ReactElement } from 'react' // ** MUI Imports import Box from '@mui/material/Box' import Grid from '@mui/material/Grid' import Card from '@mui/material/Card' import Switch from '@mui/material/Switch' import Select from '@mui/material/Select' import Dialog from '@mui/material/Dialog' import Button from '@mui/material/Button' import MenuItem from '@mui/material/MenuItem' import TextField from '@mui/material/TextField' import IconButton from '@mui/material/IconButton' import Typography from '@mui/material/Typography' import InputLabel from '@mui/material/InputLabel' import FormControl from '@mui/material/FormControl' import CardContent from '@mui/material/CardContent' import Fade, { FadeProps } from '@mui/material/Fade' import DialogContent from '@mui/material/DialogContent' import DialogActions from '@mui/material/DialogActions' import FormControlLabel from '@mui/material/FormControlLabel' // ** Icon Imports import Icon from 'src/@core/components/icon' // ** Hooks import useBgColor from 'src/@core/hooks/useBgColor' const Transition = forwardRef(function Transition( props: FadeProps & { children?: ReactElement }, ref: Ref ) { return }) const DialogAddAddress = () => { // ** States const [show, setShow] = useState(false) const [addressType, setAddressType] = useState<'home' | 'office'>('home') // ** Hooks const bgColors = useBgColor() return ( Add New Address Ready to use form to collect user address data with validation and custom input support. setShow(false)} TransitionComponent={Transition} onBackdropClick={() => setShow(false)} > `${theme.spacing(8)} !important`, px: theme => [`${theme.spacing(5)} !important`, `${theme.spacing(15)} !important`], pt: theme => [`${theme.spacing(8)} !important`, `${theme.spacing(12.5)} !important`] }} > setShow(false)} sx={{ position: 'absolute', right: '1rem', top: '1rem' }} > Add New Address Add address for billing address setAddressType('home')} sx={{ py: 3, px: 4, borderRadius: 1, cursor: 'pointer', ...(addressType === 'home' ? { ...bgColors.primaryLight } : { backgroundColor: 'action.hover' }), border: theme => `1px solid ${addressType === 'home' ? theme.palette.primary.main : theme.palette.secondary.main}`, ...(addressType === 'home' ? { ...bgColors.primaryLight } : { backgroundColor: bgColors.secondaryLight.backgroundColor }) }} > Home Delivery Time (7am - 9pm) setAddressType('office')} sx={{ py: 3, px: 4, borderRadius: 1, cursor: 'pointer', ...(addressType === 'office' ? { ...bgColors.primaryLight } : { backgroundColor: 'action.hover' }), border: theme => `1px solid ${addressType === 'office' ? theme.palette.primary.main : theme.palette.secondary.main}`, ...(addressType === 'office' ? { ...bgColors.primaryLight } : { backgroundColor: bgColors.secondaryLight.backgroundColor }) }} > Office Delivery Time (10am - 6pm) Country } label='Make this default shipping address' /> [`${theme.spacing(5)} !important`, `${theme.spacing(15)} !important`], pb: theme => [`${theme.spacing(8)} !important`, `${theme.spacing(12.5)} !important`] }} > ) } export default DialogAddAddress